|
14 | 14 | Language: English | [中文](README-ZH.md)
|
15 | 15 |
|
16 | 16 | An **assets picker** which based on the WeChat's UI,
|
17 |
| -using `photo_manager` for asset implementation, |
18 |
| -`extended_image` for image preview, |
19 |
| -and `provider` to help control the state of the picker. |
| 17 | +using [`photo_manager`](https://pub.dev/packages/photo_manager) for asset implementation, |
| 18 | +[`extended_image`](https://pub.dev/packages/extended_image) for image preview, |
| 19 | +and [`provider`](https://pub.dev/packages/provider) to help control the state of the picker. |
20 | 20 |
|
21 | 21 | To take a photo or a video for assets, please check the detailed usage in the example, and head over to
|
22 | 22 | [wechat_camera_picker](https://pub.dev/packages/wechat_camera_picker).
|
@@ -180,27 +180,28 @@ final AssetEntity? entity = await AssetPicker.pickAssets(
|
180 | 180 |
|
181 | 181 | Fields in `AssetPickerConfig`:
|
182 | 182 |
|
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` | |
| 183 | +| Name | Type | Description | Default | |
| 184 | +|-------------------------|--------------------------------------|---------------------------------------------------------------------------|-----------------------------| |
| 185 | +| selectedAssets | `List<AssetEntity>?` | Selected assets. Prevent duplicate selection. | `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`**. | 80 | |
| 188 | +| gridThumbnailSize | `ThumbnailSize` | Thumbnail size for the grid's item. | `ThumbnailSize.square(200)` | |
| 189 | +| pathThumbnailSize | `ThumbnailSize` | Thumbnail size for the path selector. | `ThumbnailSize.square(80)` | |
| 190 | +| previewThumbnailSize | `ThumbnailSize?` | Preview thumbnail size in the viewer. | `null` | |
| 191 | +| requestType | `RequestType` | Request type for picker. | `RequestType.common` | |
| 192 | +| specialPickerType | `SpacialPickerType?` | Provides the option to integrate a custom picker type. | `null` | |
| 193 | +| keepScrollOffset | `bool` | Whether the picker should save the scroll offset between pushes and pops. | `null` | |
| 194 | +| sortPathDelegate | `SortPathDelegate<AssetPathEntity>?` | Path entities sort delegate for the picker, sort paths as you want. | `CommonSortPathDelegate` | |
| 195 | +| filterOptions | `FilterOptionGroup?` | Allow users to customize assets filter options. | `null` | |
| 196 | +| gridCount | `int` | Grid count in picker. | 4 | |
| 197 | +| themeColor | `Color?` | Main theme color for the picker. | `Color(0xff00bc56)` | |
| 198 | +| pickerTheme | `ThemeData?` | Theme data provider for the picker and the viewer. | `null` | |
| 199 | +| textDelegate | `AssetPickerTextDelegate?` | Text delegate for the picker, for customize the texts. | `AssetPickerTextDelegate()` | |
| 200 | +| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` | |
| 201 | +| specialItemBuilder | `SpecialItemBuilder?` | The widget builder for the special item. | `null` | |
| 202 | +| loadingIndicatorBuilder | `IndicatorBuilder?` | Indicates the loading status for the builder. | `null` | |
| 203 | +| selectPredicate | `AssetSelectPredicate` | Predicate whether an asset can be selected or unselected. | `null` | |
| 204 | +| shouldRevertGrid | `bool?` | Whether the assets grid should revert. | `null` | |
204 | 205 |
|
205 | 206 | ### Detailed usage
|
206 | 207 |
|
|
0 commit comments