import 'package:flutter/material.dart'; void main() { runApp(MaterialApp( home: MyApp(), )); } class MyApp extends StatefulWidget { @override _State createState() => _State(); } class _State extends State { void showBottom() { showModalBottomSheet( context: context, builder: (BuildContext context) { return Container( padding: EdgeInsets.all(15.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('Welcome To Tutor Joes'), FlatButton( color: Colors.red, child: Text( 'OK', style: TextStyle(color: Colors.white), ), onPressed: () { Navigator.pop(context); }, ), ], ), ); }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Bottom Sheet'), ), body: Center( child: RaisedButton( child: Text( 'Click Me', style: TextStyle(color: Colors.white), ), color: Colors.blue, onPressed: showBottom, ), ), ); } }