You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add media controls along the bottom of app, across all app routes. Using bottom sheet worked great, until I noticed that it was covering the body.
Is that intended behavior? Is that documented somewhere? How is bottom sheet intended to be used? Is there a way to dynamically size body according to available space?
BTW, ❤️ flutter. It was actually kinda fun making that reproduction case, and took like 3 minutes.
Note the usage of MediaQuery to make sure that the unexpected behavior always occurs, regardless of device size. 😌
Yep, switched to flutter channel master, ran flutter upgrade, flutter clean, and ran it again, still an issue.
Here's the output of flutter doctor:
octor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.20.0-3.0.pre.193, on Linux, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
✗ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions.
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.46.1)
[✓] Connected device (2 available)
! Doctor found issues in 1 category.
I can confirm this issue still occurs in Flutter 1.22.4.
Can anyone confirm this really is a bug and not expected behavior?
Since any widget can be passed as bottomSheet to Scaffold (to be shown permanently), I do feel like it is a bug that body content gets covered by the persistent bottomSheet widget.
Facing the same issue in 3.10.2. As a workaround, I moved the bottomsheet widget inside the scaffold body and pushed it to the bottom of the page using the Column and Expanded widgets. This way I don't have to worry about the bottomsheet widget's height.
return Scaffold(
...
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min, // this is necessary
children: [
buildBottomSheet(),
bulidBottomNavigationBar(),
],
),
);
Reacted by Christen Blom-Dahl, Cevin, geronimol, crazyguysdev, Andrei Erdoss, Juras Norkus, Natzely, Vadym Matus, HBatalha, Chollarasan Neetable and 3 more
Activity
yringler commentedon Feb 7, 2020
I'm trying to add media controls along the bottom of app, across all app routes. Using bottom sheet worked great, until I noticed that it was covering the body.
Is that intended behavior? Is that documented somewhere? How is bottom sheet intended to be used? Is there a way to dynamically size body according to available space?
yringler commentedon Feb 7, 2020
BTW, ❤️ flutter. It was actually kinda fun making that reproduction case, and took like 3 minutes.
Note the usage of MediaQuery to make sure that the unexpected behavior always occurs, regardless of device size. 😌
VladyslavBondarenko commentedon Feb 7, 2020
Hi @yringler
As workaround you can set bottom padding to the body with the same value that you set to the bottomSheet height
yringler commentedon Feb 7, 2020
Thank you.
It's a little more tricky for actual app because the bottom sheet isn't always showing (only when audio is playing), but a little streambuilder (abstracted to it's own widget) has everything working great.
(here's the widget which gives child padding if audo bar is visible, and widget which tells child if audio bar is visible)
darshankawar commentedon Jul 9, 2020
Hi @yringler,
Can you please confirm if this is still an issue on latest Flutter channel (eg : dev, master) ?
yringler commentedon Jul 9, 2020
Yep, switched to flutter channel master, ran flutter upgrade, flutter clean, and ran it again, still an issue.
Here's the output of flutter doctor:
zepfietje commentedon Dec 2, 2020
I can confirm this issue still occurs in Flutter 1.22.4.
Can anyone confirm this really is a bug and not expected behavior?
Since any widget can be passed as
bottomSheettoScaffold(to be shown permanently), I do feel like it is a bug thatbodycontent gets covered by the persistentbottomSheetwidget.darshankawar commentedon Dec 3, 2020
Verified and replicable on latest stable. Content beyond 5 is hidden behind bottomsheet which isn't scrollable.
flutter doctor -v
27 remaining items
vipranarayan14 commentedon Jun 20, 2023
Facing the same issue in
3.10.2. As a workaround, I moved the bottomsheet widget inside the scaffoldbodyand pushed it to the bottom of the page using theColumnandExpandedwidgets. This way I don't have to worry about the bottomsheet widget's height.innomatica commentedon Jul 11, 2023
As pointed out by @CevinWays, I use
bottomNavigationBarinstead ofbottomSheetto solve this issue. I do not know if it has any side effect though.Instead of
use
egormzln commentedon Aug 17, 2023
Flutter 3.10.6 the same issue
thecoder-co commentedon Jan 21, 2024
Flutter 3.13.6 has the same issue
yasht01 commentedon Feb 13, 2024
Is there any good workaround for this issue? Facing it on
3.13.9and3.16.8ViniciusCdeAlmeida commentedon Aug 12, 2025
#50314 (comment)