Skip to content

Commit db689fe

Browse files
committed
📝 Update documents
1 parent eeb49b8 commit db689fe

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

README-ZH.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,9 @@ final AssetEntity? entity = await AssetPicker.pickAssets(
201201
| sortPathDelegate | `SortPathDeleage?` | 资源路径的排序实现,可自定义路径排序方法 | `CommonSortPathDelegate` |
202202
| textDelegate | `DefaultAssetsPickerTextDelegate?` | 选择器的文本代理构建,用于自定义文本 | `DefaultAssetsPickerTextDelegate()` |
203203
| filterOptions | `FilterOptionGroup?` | 允许用户自定义资源过滤条件 | `null` |
204-
| specialItemBuilder | `WidgetBuilder?` | 自定义item的构造方法 | `null` |
204+
| specialItemBuilder | `SpecialItemBuilder?` | 自定义item的构造方法 | `null` |
205205
| specialItemPosition | `SpecialItemPosition` | 允许用户在选择器中添加一个自定义item,并指定位置。 | `SpecialPosition.none` |
206206
| loadingIndicatorBuilder | `IndicatorBuilder?` | 加载器的实现 | `null` |
207-
| allowSpecialItemWhenEmpty | `bool` | 在资源为空时是否允许显示自定义item | `false` |
208207
| selectPredicate | `AssetSelectPredicate` | 判断资源可否被选择 | `null` |
209208
| shouldRevertGrid | `bool?` | 判断资源网格是否需要倒序排列 | `null` |
210209
| pageRouteBuilder | `AssetPickerPageRouteBuilder` | 构建 `AssetPickerPageRoute` | `null` |

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -180,28 +180,27 @@ final AssetEntity? entity = await AssetPicker.pickAssets(
180180

181181
Fields in `AssetPickerConfig`:
182182

183-
| Name | Type | Description | Default |
184-
|---------------------------|-------------------------------|---------------------------------------------------------------------------------------------------------------------|-------------------------------------|
185-
| selectedAssets | `List<AssetEntity>?` | Selected assets. Prevent duplicate selection. If you don't need to prevent duplicate selection, just don't pass it. | `null` |
186-
| maxAssets | `int` | Maximum asset that the picker can pick. | 9 |
187-
| pageSize | `int?` | Number of assets per page. **Must be a multiple of `gridCount`**. | 320 (80 * 4) |
188-
| gridThumbSize | `int` | Thumbnail size for the grid's item. | 200 |
189-
| pathThumbSize | `int` | Thumbnail size for the path selector. | 80 |
190-
| previewThumbSize | `List<int>?` | Preview thumbnail size in the viewer. | `null` |
191-
| gridCount | `int` | Grid count in picker. | 4 |
192-
| requestType | `RequestType` | Request type for picker. | `RequestType.image` |
193-
| specialPickerType | `SpacialPickerType?` | Provides the option to integrate a custom picker type. | `null` |
194-
| themeColor | `Color?` | Main theme color for the picker. | `Color(0xff00bc56)` |
195-
| pickerTheme | `ThemeData?` | Theme data provider for the picker and the viewer. | `null` |
196-
| sortPathDelegate | `SortPathDeleage?` | Path entities sort delegate for the picker, sort paths as you want. | `CommonSortPathDelegate` |
197-
| textDelegate | `AssetsPickerTextDelegate?` | Text delegate for the picker, for customize the texts. | `DefaultAssetsPickerTextDelegate()` |
198-
| filterOptions | `FilterOptionGroup?` | Allow users to customize assets filter options. | `null` |
199-
| specialItemBuilder | `WidgetBuilder?` | The widget builder for the special item. | `null` |
200-
| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` |
201-
| loadingIndicatorBuilder | `IndicatorBuilder?` | Indicates the loading status for the builder. | `null` |
202-
| allowSpecialItemWhenEmpty | `bool` | Whether the special item will display or not when assets is empty. | `false` |
203-
| selectPredicate | `AssetSelectPredicate` | Predicate whether an asset can be selected or unselected. | `null` |
204-
| shouldRevertGrid | `bool?` | Whether the assets grid should revert. | `null` |
183+
| Name | Type | Description | Default |
184+
|---------------------------|-----------------------------|---------------------------------------------------------------------------------------------------------------------|-------------------------------------|
185+
| selectedAssets | `List<AssetEntity>?` | Selected assets. Prevent duplicate selection. If you don't need to prevent duplicate selection, just don't pass it. | `null` |
186+
| maxAssets | `int` | Maximum asset that the picker can pick. | 9 |
187+
| pageSize | `int?` | Number of assets per page. **Must be a multiple of `gridCount`**. | 320 (80 * 4) |
188+
| gridThumbSize | `int` | Thumbnail size for the grid's item. | 200 |
189+
| pathThumbSize | `int` | Thumbnail size for the path selector. | 80 |
190+
| previewThumbSize | `List<int>?` | Preview thumbnail size in the viewer. | `null` |
191+
| gridCount | `int` | Grid count in picker. | 4 |
192+
| requestType | `RequestType` | Request type for picker. | `RequestType.image` |
193+
| specialPickerType | `SpacialPickerType?` | Provides the option to integrate a custom picker type. | `null` |
194+
| themeColor | `Color?` | Main theme color for the picker. | `Color(0xff00bc56)` |
195+
| pickerTheme | `ThemeData?` | Theme data provider for the picker and the viewer. | `null` |
196+
| sortPathDelegate | `SortPathDeleage?` | Path entities sort delegate for the picker, sort paths as you want. | `CommonSortPathDelegate` |
197+
| textDelegate | `AssetsPickerTextDelegate?` | Text delegate for the picker, for customize the texts. | `DefaultAssetsPickerTextDelegate()` |
198+
| filterOptions | `FilterOptionGroup?` | Allow users to customize assets filter options. | `null` |
199+
| specialItemBuilder | `SpecialItemBuilder?` | The widget builder for the special item. | `null` |
200+
| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` |
201+
| loadingIndicatorBuilder | `IndicatorBuilder?` | Indicates the loading status for the builder. | `null` |
202+
| selectPredicate | `AssetSelectPredicate` | Predicate whether an asset can be selected or unselected. | `null` |
203+
| shouldRevertGrid | `bool?` | Whether the assets grid should revert. | `null` |
205204

206205
### Detailed usage
207206

0 commit comments

Comments
 (0)