Skip to content

Instantly share code, notes, and snippets.

@mingsai
Last active December 11, 2019 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mingsai/2f6c4501f87f8e21c2d4ebad9e6e2086 to your computer and use it in GitHub Desktop.
Save mingsai/2f6c4501f87f8e21c2d4ebad9e6e2086 to your computer and use it in GitHub Desktop.
Scaffold with drawer example
import 'package:flutter/material.dart';
void main()
{
runApp(MaterialApp(
title: 'AndroidMonks',
home: Scaffold(
appBar: AppBar(
title: Text('Androidmonks'),
backgroundColor: Colors.orangeAccent,
),
floatingActionButton: FloatingActionButton(backgroundColor: Colors.orangeAccent,onPressed: null,child: Text('Press'),),
body: Container(child: ListView(children: <Widget>[
Text('Body Content 1',style: TextStyle(fontStyle: FontStyle.italic),),
Text('Body Content 2',style: TextStyle(fontStyle: FontStyle.italic),)
],),),
bottomNavigationBar:new BottomNavigationBar(fixedColor: Colors.orangeAccent,items: [
new BottomNavigationBarItem(
icon: new Icon(Icons.home),
title: new Text("Home"),
),
new BottomNavigationBarItem(
icon: new Icon(Icons.comment),
title: new Text("Comments"),
)
]),
persistentFooterButtons: <Widget>[new Text('Sample Persistent Footer'),
new Icon(Icons.airline_seat_flat),],
drawer: Drawer(child: ListView(
children: <Widget>[
new DrawerHeader(child: Icon(Icons.account_box,size: 90,),
decoration: BoxDecoration(
color: Colors.orangeAccent
),
),
Text('Menu Item 1'),
Text('Menu Item 2')
],
),
),
),
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment