return Scaffold( appBar:AppBar( title:Text('Abc'), leading:Icon(Icons.home), elevation:4.0,//最下方陰影部分輻射範圍 actions:<widget>[],//如圖區域 iconTheme: IconThemeData(//設置圖標樣式 color:, opacity:0.1, size:10.2 ), brightness: Brightness.light,//應用欄材質的亮度 backgroundColor: Colors.blueAccent,//背景顏色 titleSpacing: 0.0,// 橫軸上圍繞title內容的間距 0.0即佔據全部有用空間 primary:true,appbar是否顯示在任務欄頂部,true表明不被任務欄遮蓋 centerTitle:true/false,//是否居中title flexibleSpace:Container( color:colors.red, ), automaticallyImplyLeading: true, //配合leading使用,取決於automaticallyImplyLeading == true && leading ==null ,此時會自動作出一些哈事情 bottom://接收一個widget textTheme: TextTheme(), toolbarOpacity: 1,//appBar上部分透明度 bottomOpacity: 1, ) )
設置flutter AppBar的高度app
Scaffold( appBar:PreferredSize( child:AppBar() ), preferredSize:size.fromHeight(screenSixe.height * 0.07) )
設置flutter bottom的高度flex
bottom: PreferredSize( child: Container( height: 50, width: double.infinity, color: Colors.grey, child: Text('bottom'), ), preferredSize: Size(30, 100), ),