flutter --画appBar返回键


 

   appBar: AppBar(

  backgroundColor: Color.fromRGBO(248,250,255,1),  //设置appBar背景色
elevation: 0, // 立视度为0
title: Text(
'记录',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold, ),
),
centerTitle: true, // 居中显示
leading: Container( // 绘制返回键
margin: EdgeInsets.all(10), // 设置边距
decoration: BoxDecoration(
boxShadow: <BoxShadow>[
BoxShadow(
offset: Offset(1, 2), // 阴影起始位置
blurRadius: 5, // 阴影面积
color: Colors.grey.withOpacity(.4), // 阴影透明度
)
],
color: Colors.white, // Container背景色
borderRadius: BorderRadius.all(
Radius.circular(100.0), // Container设置为圆形
),
),
child: IconButton(
icon: Icon(
Icons.arrow_back_ios,
size: 20,
),
onPressed: () {
Navigator.pop(context); // 关闭当前页面
},
)
),
),


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM