
微信交流群
# MaterialBanner
Material 风格的标语(Banner)控件
基本用法:
MaterialBanner(
content: Text('老孟'),
actions: <Widget>[
IconButton(icon: Icon(Icons.add),onPressed: (){},),
IconButton(icon: Icon(Icons.close),onPressed: (){},)
],
)
1
2
3
4
5
6
7
2
3
4
5
6
7
设置内容样式:
MaterialBanner(
contentTextStyle: TextStyle(color: Colors.red),
content: Text('老孟'),
actions: <Widget>[
IconButton(icon: Icon(Icons.add),onPressed: (){},),
IconButton(icon: Icon(Icons.close),onPressed: (){},)
],
)
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
添加开头图标及内边距:
MaterialBanner(
leading: IconButton(
icon: Icon(Icons.person),
onPressed: (){},
),
leadingPadding: EdgeInsets.all(5),
content: Text('老孟'),
actions: <Widget>[
IconButton(
icon: Icon(Icons.add),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.close),
onPressed: () {},
)
],
)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
版权所有,禁止私自转发、克隆网站。