diff --git a/lib/src/models/special_item.dart b/lib/src/models/special_item.dart index 24e59c35..10b9c169 100644 --- a/lib/src/models/special_item.dart +++ b/lib/src/models/special_item.dart @@ -1,18 +1,20 @@ import 'package:flutter/material.dart'; import 'package:wechat_assets_picker/wechat_assets_picker.dart'; +/// Allow users to set a special item in the picker grid with specified [position]. +/// 允许用户在选择器中添加一个自定义item,并指定其位置。 @immutable -class SpecialItem { - SpecialItem({ - required this.itemPosition, - this.itemBuilder, +class SpecialItem { + const SpecialItem({ + required this.builder, + required this.position, }); - /// Allow users set a special item in the picker with several positions. - /// 允许用户在选择器中添加一个自定义item,并指定位置 - final SpecialItemPosition itemPosition; - /// The widget builder for the the special item. - /// 自定义item列表 - final SpecialItemBuilder? itemBuilder; + /// 自定义item构建。 + final SpecialItemBuilder? builder; + + /// Define how the item will be positioned. + /// 定义如何摆放item。 + final SpecialItemPosition position; }