Last active
December 11, 2019 00:29
-
-
Save mingsai/2f6c4501f87f8e21c2d4ebad9e6e2086 to your computer and use it in GitHub Desktop.
Scaffold with drawer example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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