mcrovero / rubber

An elastic material bottom sheet implementation for Flutter.
BSD 2-Clause "Simplified" License
562 stars 88 forks source link

How to ensure proper widget height when working with percentages? #21

Closed mochar closed 5 years ago

mochar commented 5 years ago

When using a percentage to set the lowerBoundValue and the bottom sheet is collapsed, how can I make sure that the widget on the top of the bottom sheet expands the area properly? This is for example and issue when I switch to landscape mode, as the available size is much smaller then, which is causing overflow issues.

Thanks!!!

mcrovero commented 5 years ago

I think you should probably wrap your upperLayer with a Scrollable widget in order to avoid the overflow issues. Provide your code if this doesn't fix it

mochar commented 5 years ago

I guess what I'm asking is how to make sure that the information shown in the "header" portion of the sheet fits perfectly in the visible area when collapsed. For example, in "tall" devices, a lower bound value of 10% shows more than just the header widget, while in "shorter" devices the header might not be completely visible.

The obvious solution is setting the pixel value instead of percentage, but this currently leads to an error (see my other issue).

mochar commented 5 years ago

The new header and headerHeight property solved this. Thank you :-)