Comments (2)
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...
from popup_menu.
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.
from popup_menu.
Related Issues (20)
- 呼出菜单位置偏移
- Space between image and text
- text hidden
- 页面返回之后,菜单没有销毁 HOT 1
- userInfo missing in MenuItemProvider HOT 2
- Add ability to change MenuItem width and height HOT 1
- Get index of clicked menu item HOT 2
- [web] When scrolling with the mouse wheel the popup menu does not dismiss
- 建议增加边框设定
- offset.x is not suitable on somecase.
- Multiple widgets used the same GlobalKey. HOT 1
- Last line of the menu is not drawn
- I have this error HOT 1
- Can you update this to null safety? HOT 3
- Pop up menu remains opened. It should be closed. HOT 1
- menu wont show
- null safety HOT 2
- MenuItem isn't a function Error HOT 3
- Migrate to null safety. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from popup_menu.