flutter AppBar
生活随笔
收集整理的這篇文章主要介紹了
flutter AppBar
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
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的高度
Scaffold(appBar:PreferredSize(child:AppBar()),preferredSize:size.fromHeight(screenSixe.height * 0.07) )設置flutter ?bottom的高度
bottom: PreferredSize(child: Container(height: 50,width: double.infinity,color: Colors.grey,child: Text('bottom'),),preferredSize: Size(30, 100), ),?
轉載于:https://www.cnblogs.com/shui1993/p/11186886.html
總結
以上是生活随笔為你收集整理的flutter AppBar的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Namenode文件系统命名空间映像文件
- 下一篇: SpringBoot 集成Mybatis