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

How to change the color of the menu? #20

Open
stephane-archer opened this issue Dec 23, 2024 · 6 comments
Open

How to change the color of the menu? #20

stephane-archer opened this issue Dec 23, 2024 · 6 comments
Assignees

Comments

@stephane-archer
Copy link
Contributor

I have two white bars, but I can't find a way to remove them.

Screenshot 2024-12-23 at 21 41 46 Screenshot 2024-12-23 at 21 41 37
@esDotDev esDotDev self-assigned this Dec 23, 2024
@esDotDev
Copy link
Contributor

esDotDev commented Dec 23, 2024

Have you tried using a custom card builder? Also check the src for the default card to see which ThemeData values you might need to set:
https://github.com/gskinnerTeam/flutter-context-menu/blob/master/lib/src/widgets/context_menu_card.dart

@stephane-archer
Copy link
Contributor Author

@esDotDev I used a ContextMenuRegion and a GenericContextMenu to create my menu.
I'm not sure where is this "custom card builder"

@esDotDev
Copy link
Contributor

esDotDev commented Dec 23, 2024

@stephane-archer
Copy link
Contributor Author

stephane-archer commented Dec 23, 2024

Screenshot 2024-12-23 at 22 16 15 Screenshot 2024-12-23 at 22 16 28

Putting the widget after the theme definition fixed the problem:

The example in the README is not correct

return ContextMenuOverlay(
  child: MaterialApp(...)
);

This will be more correct

return MaterialApp(
   theme: ...,
  child: ContextMenuOverlay(child: ...)
);

Another issue appeared, it used by default when overring the secondary color instead of onPrimary for the text color.
Screenshot 2024-12-23 at 22 22 47

@stephane-archer
Copy link
Contributor Author

@esDotDev #21 this should fix the issue

@stephane-archer
Copy link
Contributor Author

Hi @esDotDev, thank you for merging the pull request! I'd like to know about the release cycle for this project. When will these changes be available for Flutter users?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants