File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1
- ## ** 文档完善中**
1
+ ## ** Icon**
2
+
3
+ >
4
+ 使用IconData中描述的小图标,flutter大概内置了1000+个icon
5
+ ### 构造方法
6
+ ``` dart
7
+ Icon(this.icon, {
8
+ Key key,
9
+ this.size,
10
+ this.color,
11
+ this.semanticLabel,
12
+ this.textDirection,
13
+ })
14
+ ```
15
+
16
+ ### 属性介绍
17
+ * this.icon: IconData对象,必须传入
18
+ * size:图标大小
19
+ * color:图标颜色
20
+ * semanticLabel:图标的语义标签
21
+ * textDirection:渲染图标的文本方向
Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ class _IndexState extends State<Index> {
18
18
title: Text ('Icon' ),
19
19
),
20
20
body: Center (
21
- child: Text ('更新中' ),
21
+ child: Icon (
22
+ Icons .android,
23
+ size: 100.0 ,
24
+ color: Theme .of (context).primaryColor,
25
+ ),
22
26
),
23
27
);
24
28
}
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ Flutter UI
92
92
│ ├─container 【✔️ v1.0】
93
93
│ ├─divider 【✔️ v1.0】
94
94
│ ├─flatbutton 【✔️ v1.0】
95
- │ ├─icon
95
+ │ ├─icon 【✔️ v1.0】
96
96
│ ├─iconbutton
97
97
│ ├─image
98
98
│ ├─listtile
You can’t perform that action at this time.
0 commit comments