File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Template/MobileTemplate/flutter_template/lib Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,46 @@ class _MyHomePageState extends State<MyHomePage> {
108108 tooltip: 'Increment' ,
109109 child: Icon (Icons .add),
110110 ), // This trailing comma makes auto-formatting nicer for build methods.
111+ drawer: Drawer (
112+ child: ListView (
113+ children: < Widget > [
114+ DrawerHeader (
115+ child: Text ('Drawer Header' ),
116+ decoration: BoxDecoration (
117+ color: Colors .blue,
118+ ),
119+ ),
120+ ListTile (
121+ title: Text ("Item 1" ),
122+ trailing: Icon (Icons .arrow_forward),
123+ onTap: () {
124+ Navigator .of (context).pop ();
125+ Navigator .of (context).push (
126+ MaterialPageRoute (
127+ builder: (context) {
128+ return MyHomePage (title: 'Flutter Demo Home PageA' );
129+ },
130+ ),
131+ );
132+ },
133+ ),
134+ ListTile (
135+ title: Text ("Item 2" ),
136+ trailing: Icon (Icons .arrow_forward),
137+ onTap: () {
138+ Navigator .of (context).pop ();
139+ Navigator .of (context).push (
140+ MaterialPageRoute (
141+ builder: (context) {
142+ return MyHomePage (title: 'Flutter Demo Home PageB' );
143+ },
144+ ),
145+ );
146+ },
147+ ),
148+ ],
149+ ),
150+ ),
111151 );
112152 }
113153}
You can’t perform that action at this time.
0 commit comments