Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backgrounColor only effects arrow #59

Closed
hellohejinyu opened this issue Jan 14, 2023 · 4 comments
Closed

backgrounColor only effects arrow #59

hellohejinyu opened this issue Jan 14, 2023 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@hellohejinyu
Copy link

hellohejinyu commented Jan 14, 2023

Describe the bug
A clear and concise description of what the bug is.
Set the background color, only the arrow part takes effect.

To Reproduce
Steps to reproduce the behavior:

  1. download example;
  2. set backgroundColor to Colors.red;
  3. run example;

Expected behavior
the popover is red

Screenshots

showPopover(
  context: context,
  /// change here
  bodyBuilder: (context) => const SizedBox(
    width: 200,
    height: 400,
  ),
  onPop: () => print('Popover was popped!'),
  direction: PopoverDirection.bottom,
  /// change here
  backgroundColor: Colors.red,
  width: 200,
  height: 400,
  arrowHeight: 15,
  arrowWidth: 30,
);
@hellohejinyu
Copy link
Author

child: Material(child: widget.child),

I remove the Material, then it works fine.

@minikin
Copy link
Owner

minikin commented Jan 23, 2023

@hellohejinyu Thank you for your report.
I'm sure that the Material widget is required in PopoverItem. Otherwise, we will have an exception.
Feel free to create a PR with the appropriate fix.

@minikin minikin added bug Something isn't working help wanted Extra attention is needed labels Jan 23, 2023
@socramm9
Copy link

I diden't have any issue removing the Material widget. But if it hast to stay you could use this:

child: Material(
    color: widget.backgroundColor,
    child: widget.child,
),

@minikin
Copy link
Owner

minikin commented Feb 5, 2023

The bug was fixed in the latest version. Thank you!

@minikin minikin closed this as completed Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants