Permanent Persistent Bottom sheet flutter
Also you can use WillPopScope
Widget to control pressing back button:
Widget _buildBottomSheet() {
return WillPopScope(
onWillPop: () {
**here you can handle back button pressing. Just leave it empty to disable back button**
},
child: **your bottom sheet**
)),
);
}
Scaffold now has a bottom sheet argument and this bottom sheet cannot be dismissed by swiping down the screen.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(....),
bottomSheet: Container(
child: Text('Hello World'),
),
);
}