Skip to content

Commit f04bd05

Browse files
committed
📝 Add pickAssetsWithDelegate usage
1 parent 7c138d5 commit f04bd05

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ platform :osx, '10.15'
174174
| filterOptions | `FilterOptionGroup?` | Allow users to customize assets filter options. | `null` |
175175
| specialItemBuilder | `WidgetBuilder?` | The widget builder for the special item. | `null` |
176176
| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` |
177+
| loadingIndicatorBuilder | `IndicatorBuilder?` | Indicates the loading status for the builder. | `null` |
177178
| allowSpecialItemWhenEmpty | `bool` | Whether the special item will display or not when assets is empty. | `false` |
178179
| routeCurve | `Curve` | The curve which the picker use to build page route transition. | `Curves.easeIn` |
179180
| routeDuration | `Duration` | The duration which the picker use to build page route transition. | `const Duration(milliseconds: 500)` |
@@ -184,12 +185,16 @@ platform :osx, '10.15'
184185
final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
185186
```
186187

187-
or
188+
### Using custom delegate
188189

189190
```dart
190-
AssetPicker.pickAsset(context).then((List<AssetEntity> assets) {
191-
/.../
192-
});
191+
final YourAssetPickerProvider provider = your_provider;
192+
final CustomAssetPickerBuilderDelegate builder = your_builder(provider);
193+
final List<YourAssetEntity>? result = await AssetPicker.pickAssetsWithDelegate(
194+
context,
195+
provider: provider,
196+
delegate: builder,
197+
);
193198
```
194199

195200
### Complete param usage

0 commit comments

Comments
 (0)