Skip to content

Commit 27bb4c3

Browse files
committed
feat: icon
1 parent 77e0129 commit 27bb4c3

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

docs/widget/common/icon/index.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
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:渲染图标的文本方向

lib/widget/common/icon/demo.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class _IndexState extends State<Index> {
1818
title: Text('Icon'),
1919
),
2020
body: Center(
21-
child: Text('更新中'),
21+
child: Icon(
22+
Icons.android,
23+
size: 100.0,
24+
color: Theme.of(context).primaryColor,
25+
),
2226
),
2327
);
2428
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Flutter UI
9292
│ ├─container 【✔️ v1.0】
9393
│ ├─divider 【✔️ v1.0】
9494
│ ├─flatbutton 【✔️ v1.0】
95-
│ ├─icon
95+
│ ├─icon 【✔️ v1.0】
9696
│ ├─iconbutton
9797
│ ├─image
9898
│ ├─listtile

0 commit comments

Comments
 (0)