A modal bottom sheet is an alternative to a menu or a dialog and prevents the user from interacting with the rest of the app.
This is how it looks like.
; background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre-wrap;](color: #569cd6;](import color: #ce9178;]('package:flutter/material.dart';
color: #569cd6;](void color: #dcdcaa;](main() { color: #dcdcaa;](runApp(color: #4ec9b0;](MaterialApp(home:color: #4ec9b0;](ModalBottomSheetDemo()));}
color: #569cd6;](class color: #4ec9b0;](ModalBottomSheetDemo color: #569cd6;](extends color: #4ec9b0;](StatefulWidget { color: #569cd6;](@override color: #4ec9b0;](_ModalBottomSheetDemoState color: #dcdcaa;](createState() => color: #4ec9b0;](_ModalBottomSheetDemoState();}
color: #569cd6;](class color: #4ec9b0;](_ModalBottomSheetDemoState color: #569cd6;](extends color: #4ec9b0;](State { color: #569cd6;](int _index = color: #b5cea8;](0; color: #569cd6;](void color: #dcdcaa;](_showModalSheet(color: #569cd6;](int i) { color: #dcdcaa;](showModalBottomSheet(context: context, builder: (builder) { color: #c586c0;](return color: #4ec9b0;](Container( child: color: #4ec9b0;](Text(color: #ce9178;]('You have opened this Modal $color: #9cdcfe;](icolor: #ce9178;]( times..'), padding: color: #4ec9b0;](EdgeInsets.color: #dcdcaa;](all(color: #b5cea8;](40.0), ); }); }
color: #569cd6;](@override color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext context) { color: #c586c0;](return color: #4ec9b0;](Scaffold( appBar: color: #4ec9b0;](AppBar( title: color: #569cd6;](const color: #4ec9b0;](Text(color: #ce9178;]('Modal bottom sheet') ), body: color: #4ec9b0;](Center( child: color: #4ec9b0;](RaisedButton( onPressed: () { color: #dcdcaa;](setState(() { _index = _index+color: #b5cea8;](1; color: #dcdcaa;](_showModalSheet(_index); }); }, child: color: #569cd6;](const color: #4ec9b0;](Text(color: #ce9178;]('Show Modal Bottom Sheet') ) ) ); }}
Please let me know if you have any further queries.
Thanks,Srikanth