flutter

Bottom Sheet

void _showBottom() {
showModalBottomSheet<void>(
    context: context,
    builder: (BuildContext context) {
    return new Container(
        padding: new EdgeInsets.all(15.0),
        child: new Row(
        mainAxisAlignment:  MainAxisAlignment.center,
        children: <Widget>[
            new Text('Widgets here', style: new TextStyle(color: Colors.red, fontWeight: FontWeight.bold),),
            new RaisedButton(onPressed: () => Navigator.pop(context), child: new Text('Close'),)
        ],
        ),
    );  
    }
);
  
@override
Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
        title: new Text('Name here'),
        ),
        body: new Container(
        padding: new EdgeInsets.all(32.0),
        child: new Center(
            child: new Column(
            children: <Widget>[
                new Text('Add Widgets Here'),
                new RaisedButton(onPressed: _showBottom, child: new Text('Click me'),)
            ],
            ),
        )
        ),
    );
}
Was this helpful?