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

adding custom widget instead of menuItems #20

Open
moda20 opened this issue Apr 23, 2020 · 2 comments
Open

adding custom widget instead of menuItems #20

moda20 opened this issue Apr 23, 2020 · 2 comments

Comments

@moda20
Copy link

moda20 commented Apr 23, 2020

Hey, is there anyway of adding custom widgets instead of multiple menu items

@despie
Copy link

despie commented May 15, 2020

I've made changes to the original code and made a custom child widget possible.
I've introduced required content width and height for easier testing. That part could be improved.

You can view and tryout the code on dartpad.

P.S. the child itself has to be inside it's own stateful widget in order to redraw changes shown in popup.
It would be great if this plugin is made generic...

@Moon1102
Copy link

To make a custom menu item, I think , you need add a custom property (like Widget child;) to MenuItemProvider, then override it at MenuItem, finally just replace _createContent() to widget.item.menuChild ?? _createContent(). It works for me.

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

3 participants