alnitak / flutter_star_menu

Flutter contextual popup menu with different shapes and multiple ways to fine-tune animation and position
MIT License
51 stars 18 forks source link

Starmenu Elements are not Stateful #5

Closed MiHechtel closed 2 years ago

MiHechtel commented 2 years ago

The single Menu Elements are not stateful. As I try to use it as a checking menu with a background color change when clicked, it would be helpful to make the StarItems stateful.

Would be glad if thats on the pipeline for this great package!

alnitak commented 2 years ago

Hi @MiHechtel sorry for the late! If I understand you correctly, you would like to have some controls to some widget while the menu is opened. StarItems is not meant to be used. My bad because I had to hide it. If you want your menu item to be StatefullWidget, you should make your own Statefull Widget and pass it to items parameters list as like other. Please see the example and find how Slider() in the entries is working and how to avoid the menu to close when changing the slider value.

Meanwhile, I have updated the package with lazyItems parameter to let you build items in runtime