import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatefulWidget { const MyApp({Key? key}) : super(key: key); @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { @override Widget build(BuildContext context) { return MaterialApp( title: 'Modal Bottom Sheet Demo', home: Scaffold( backgroundColor: Colors.blueGrey, appBar: AppBar( title: const Text('Creating a Modal Bottom Sheet'), backgroundColor: Colors.black38, ), body: Builder( builder: (context) { return Center( child: ElevatedButton( child: Text('Show Modal Bottom Sheet'), onPressed: () { showModalBottomSheet( context: context, builder: (context) { return Wrap( children: [ ListTile( leading: Icon(Icons.share), title: Text('Share'), ), ListTile( leading: Icon(Icons.copy), title: Text('Copy Link'), ), ListTile( leading: Icon(Icons.edit), title: Text('Edit'), ), ], ); }, ); }, ), ); }, ), ), ); } }