Skip to content

Instantly share code, notes, and snippets.

@IsmailAlamKhan
Created May 7, 2021 13:52
Show Gist options
  • Save IsmailAlamKhan/a087e6208e959d63d23228408e865e86 to your computer and use it in GitHub Desktop.
Save IsmailAlamKhan/a087e6208e959d63d23228408e865e86 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: Scaffold(
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(icon: Icon(Icons.ac_unit), label: 'Hello'),
BottomNavigationBarItem(icon: Icon(Icons.ac_unit), label: 'Hello'),
],
),
appBar: AppBar(
title: Text('Material App Bar'),
),
body: Navigator(
onGenerateRoute: (_) => MaterialPageRoute(
builder: (ctx) => Center(
child: Container(
child: ElevatedButton(
onPressed: () {
showModalBottomSheet(
context: ctx,
builder: (context) => Container(
color: Colors.blue,
height: 50,
width: MediaQuery.of(context).size.width,
),
);
},
child: Text('Hello World'),
),
),
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment