1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| Scaffold( appBar: AppBar(title: Text(widget.title), backgroundColor:Colors.orange , centerTitle: true, //leading: Text("左侧组件"), ), bottomNavigationBar: BottomNavigationBar(items: [ BottomNavigationBarItem(icon: Icon(Icons.print),title: Text("打印")), BottomNavigationBarItem(icon: Icon(Icons.stop),title: Text("停止")), ], type: BottomNavigationBarType.fixed, backgroundColor: Colors.blue, iconSize: 34, selectedItemColor: Colors.red, unselectedItemColor: Colors.cyan, ), //bottomSheet: Text("持久化显示底部抽屉"), resizeToAvoidBottomPadding: true, resizeToAvoidBottomInset: true, drawer: Drawer( child: Center( child: Container( color: Colors.orange, child: Text('左侧边栏',style: TextStyle(color: Colors.white,fontSize: 24.0),), ), ) ), onDrawerChanged: _drawLeftChange , onEndDrawerChanged: _drawEndChange, endDrawer: Drawer( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text("右侧抽屉"), Text("右侧抽屉"), Text("右侧抽屉"), ], ) ), persistentFooterButtons: [Icon(Icons.send),Text("One"),RaisedButton.icon(onPressed: (){}, icon: Icon(Icons.print), label: Text("打印"))], backgroundColor: Colors.grey, primary: true, extendBody: false, body: Column( children: <Widget>[ Text("Body",textScaleFactor: 2,),
], ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: Icon(Icons.add), ), );
|