darioielardi / flutter_speed_dial

Flutter plugin to implement a Material Design Speed Dial
https://pub.dev/packages/flutter_speed_dial
MIT License
410 stars 177 forks source link

Children are cut off when the screen size is too small #313

Open Kaysen98 opened 1 year ago

Kaysen98 commented 1 year ago

Hello!

When I use a lot of SpeedDialChildren and the screen size is too small the unfolded items are simply cut off. Can you add something like a Wrap widget or atleast a scroll widget to make them wrap or scrollable? Otherwise users cannot use some actions because they are cut off.

Thanks in advance!

prateekmedia commented 1 year ago

Screenshot?

Kaysen98 commented 1 year ago

Hey, I cant do a screenshot right now, but Ive got the speed dial with many items in it. When I expand it, it renders all the items accordingly on top of each other, but there are so many speeddialchildren, that the height of the column hosting the children is just bigger than the screen height. So they just disappear/overflow.

I looked into the source code a little bit and you are rendering the child elements inside a column (or row, in this case a column) - maybe wrapping a scrollview around it would already fix the issue. Or maybe give the user the option to customize the wrapping widget :)

You can easily reproduce the issue if you add many children to the speeddial until it overflows.

Thanks in advance!

Kaysen98 commented 1 year ago

For testing purposes I wrapped the column into a singlechildscrollview and added a boxconstraint of max-height to the container - that seems to fix the issue.

Kaysen98 commented 1 year ago

@prateekmedia You've got time to implement that anytime soon? :)

prateekmedia commented 1 year ago

Unfortunately this package follows Material design which limits it to current implementation. We cannot add a scroll view just cause we can.