flutter bottom sheet code example
Example 1: align bottom flutter
// Use Align if have only one child, if have multiple:
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
//your elements here
],
);
Example 2: showModalBottomSheet on load
void initState() {
// TODO: implement initState
Future.delayed(Duration(seconds: 0)).then((_) {
showModalBottomSheet(
context: context,
builder: (builder) {
return Container();
});
});
super.initState();
}