pickAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path> > static method
Future<List<Asset> ?>
pickAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path> >(
- BuildContext context, {
- required AssetPickerBuilderDelegate<
Asset, Path> delegate, - PermissionRequestOption permissionRequestOption = const PermissionRequestOption(),
- Key? key,
- AssetPickerPageRouteBuilder<
List< ? pageRouteBuilder,Asset> >
Pick assets with the given delegate
.
根据给定的 delegate
选择资源。
Set useRootNavigator
to determine
whether the picker route should use the root Navigator.
使用 useRootNavigator
来控制选择器的路由是否使用最顶层的 Navigator。
By extending the AssetPickerPageRoute, users can customize the route
and use it with the pageRouteBuilder
.
继承 AssetPickerPageRoute 可以自定义路由,
并且通过 pageRouteBuilder
进行使用。
See also:
- AssetPickerBuilderDelegate for how to customize/override widgets during the picking process.
Implementation
static Future<List<Asset>?> pickAssetsWithDelegate<Asset, Path,
PickerProvider extends AssetPickerProvider<Asset, Path>>(
BuildContext context, {
required AssetPickerBuilderDelegate<Asset, Path> delegate,
PermissionRequestOption permissionRequestOption =
const PermissionRequestOption(),
Key? key,
AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder,
bool useRootNavigator = true,
}) {
return _pickerDelegate.pickAssetsWithDelegate<Asset, Path, PickerProvider>(
context,
key: key,
delegate: delegate,
permissionRequestOption: permissionRequestOption,
useRootNavigator: useRootNavigator,
pageRouteBuilder: pageRouteBuilder,
);
}