File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:wechat_assets_picker/wechat_assets_picker.dart' ;
3
3
4
+ /// Allow users to set a special item in the picker grid with specified [position] .
5
+ /// 允许用户在选择器中添加一个自定义item,并指定其位置。
4
6
@immutable
5
- class SpecialItem {
6
- SpecialItem ({
7
- required this .itemPosition ,
8
- this .itemBuilder ,
7
+ class SpecialItem < Path > {
8
+ const SpecialItem ({
9
+ required this .builder ,
10
+ required this .position ,
9
11
});
10
12
11
- /// Allow users set a special item in the picker with several positions.
12
- /// 允许用户在选择器中添加一个自定义item,并指定位置
13
- final SpecialItemPosition itemPosition;
14
-
15
13
/// The widget builder for the the special item.
16
- /// 自定义item列表
17
- final SpecialItemBuilder <AssetPathEntity >? itemBuilder;
14
+ /// 自定义item构建。
15
+ final SpecialItemBuilder <Path >? builder;
16
+
17
+ /// Define how the item will be positioned.
18
+ /// 定义如何摆放item。
19
+ final SpecialItemPosition position;
18
20
}
You can’t perform that action at this time.
0 commit comments