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'd like to add a note that persistent_bottom_sheet_demo.dart isn't really representative of how the Material spec demonstrates persistent bottom sheets working, and I'd recommend reworking the demo or improving the APIs to show a more typical use-case. The Material spec now refers to persistent bottom sheets them as "standard bottom sheets", in opposition to "modal bottom sheets". The main difference is that persistent bottom sheets are permanent fixtures of the screen (although the contents may change over time) so they should not be dismissible by default. They also seemingly can exist at the instant a page appears, rather than appearing later. The APIs aren't well-suited for this use-case; Scaffold has a number of constructor parameters where the user can provide widgets that persist for the lifetime of the scaffold, yet not a persistent bottom sheet (which should also persist for the lifetime of the scaffold). A persistent bottom sheet can only be created after Scaffold creation by manipulating ScaffoldState, which feels unergonomic.
I agree that it would make sense to provide a way to create a scaffold with a persistent ("standard") bottom sheet. I'll open a separate issue for that.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
sethladd commentedon Oct 12, 2016
cc @HansMuller @InMatrix
abarth commentedon Oct 12, 2016
BottomSheetisn't a thing you use on its own. There are persistent bottom sheets (see https://docs.flutter.io/flutter/material/ScaffoldState/showBottomSheet.html) and modal bottom sheets (see https://docs.flutter.io/flutter/material/showModalBottomSheet.html) that are how you typically use this.The docs on https://docs.flutter.io/flutter/material/BottomSheet-class.html try to explain this situation.
HansMuller commentedon Oct 12, 2016
The gallery has persistent and modal bottom sheet demos. They're
examples/flutter_gallery/lib/demo/persistent_bottom_sheet_demo.dart
examples/flutter_gallery/lib/demo/modal_bottom_sheet_demo.dart
InMatrix commentedon Oct 12, 2016
Thanks for the pointers, @HansMuller. I'll update the page to correct the query.
sethladd commentedon Oct 12, 2016
Thanks all!
On Wed, Oct 12, 2016 at 15:06 Tao Dong [email protected] wrote:
johnfesa commentedon May 25, 2018
I'd like to add a note that persistent_bottom_sheet_demo.dart isn't really representative of how the Material spec demonstrates persistent bottom sheets working, and I'd recommend reworking the demo or improving the APIs to show a more typical use-case. The Material spec now refers to persistent bottom sheets them as "standard bottom sheets", in opposition to "modal bottom sheets". The main difference is that persistent bottom sheets are permanent fixtures of the screen (although the contents may change over time) so they should not be dismissible by default. They also seemingly can exist at the instant a page appears, rather than appearing later. The APIs aren't well-suited for this use-case; Scaffold has a number of constructor parameters where the user can provide widgets that persist for the lifetime of the scaffold, yet not a persistent bottom sheet (which should also persist for the lifetime of the scaffold). A persistent bottom sheet can only be created after Scaffold creation by manipulating ScaffoldState, which feels unergonomic.
HansMuller commentedon May 29, 2018
I agree that it would make sense to provide a way to create a scaffold with a persistent ("standard") bottom sheet. I'll open a separate issue for that.
#17998
b-cancel commentedon Jul 19, 2018
After noticing the limitations of the implementation of material sheets (modal and persistent) I decided to create my own here https://github.com/b-cancel/Flutter_MaterialSheetAndNavigationDrawer
it has tons of options and very easy to use
I hope it helps!
Roll engine 71457a6..0036a3a (4 commits)
Roll engine 71457a6..8471862 (5 commits)
Roll engine 71457a6..9ca6668 (6 commits)
Roll engine 71457a6..a8890fd (7 commits)
Roll engine 71457a6..2ec20aa (8 commits)
github-actions commentedon Sep 2, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.