flutter close a bottomsheet in code code example
Example 1: mainBottomSheet dismiss flutte
Navigator.pop(context);
Example 2: showModalBottomSheet on load
@override
void initState() {
// TODO: implement initState
Future.delayed(Duration(seconds: 0)).then((_) {
showModalBottomSheet(
context: context,
builder: (builder) {
return Container();
});
});
super.initState();
}