huextrat / menu_button

Flutter plugin to display a popup menu button widget with handsome design and easy to use.
https://pub.dev/packages/menu_button
MIT License
65 stars 23 forks source link

Menu popup opening outside of screen, cutting off height #15

Open WieFel opened 3 years ago

WieFel commented 3 years ago

Describe the bug Similar to #5, when I have a dropdown at the end (bottom) of the screen, the drop down menu opens outside of the screen, leaving only one/two items visible. The rest is cut off.

To Reproduce Steps to reproduce the behavior:

  1. Put the MenuButton somewhere at the bottom of the screen.
  2. Add like 5 menu items.
  3. Open the menu by clicking the button.
  4. See the menu overflow the screen at the bottom.

Expected behavior If at the bottom there is not enough space for the menu to fit, it should maybe expand in top direction!?

Screenshots Screenshot 2021-02-16 at 16 27 48

Screenshot 2021-02-16 at 16 34 53

Smartphone (please complete the following information):

Additional context

WieFel commented 3 years ago

@huextrat will you also take a look at this? Else I would give it a try and file a PR...

huextrat commented 3 years ago

Yes it's noted on my side I just need to find time to do it ;)

I'll keep you informed but it won't be in the next version.

WieFel commented 3 years ago

@huextrat perfect, thanks!

maverick-2013 commented 3 years ago

@WieFel Have you resolved the issue somehow? In my case popup is not scrollable at the bottom of the screen.

WieFel commented 3 years ago

@maverick-2013 not yet. Waiting for @huextrat to resolve it.

huextrat commented 3 years ago

Indeed not yet I don't have too much time at the moment to deal with the issue, if someone wants to help me I'm a taker otherwise it will be early March I hope.

As far as scrolling is concerned you can make your list scrollable with the scrollPhysics' property.

maverick-2013 commented 3 years ago

@huextrat @WieFel My widget structure is: CustomScrollView -> SliverFillRemaining -> Padding -> Column -> MenuButton.

WieFel commented 3 years ago

@huextrat I will have a look during next week and try to solve the problem.

WieFel commented 3 years ago

@huextrat I am having difficulties with changing the menu opening direction to top.

Maybe you could give me some hint. It seems that PopupRoute by default expands in bottom direction and I don't see a way to change that.

Any ideas? Would be glad if you could have a quick look.

WieFel commented 3 years ago

@huextrat still no news about this? 😬

huextrat commented 3 years ago

I started a small part of the functionality last week but I don't have much time right now so it's still on hold 🙁

vivekebiit commented 3 years ago

@huextrat is there any update on this?

russmvr commented 3 years ago

I would really like to open the list at the top in this case

huextrat commented 3 years ago

Hi, I don't have any time to work on this project right now. If someone wants to make a PR I will take the time to validate it.

Sorry :/