pickAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path>> static method

Future<List<Asset>?> pickAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path>>(
  1. BuildContext context, {
  2. required AssetPickerBuilderDelegate<Asset, Path> delegate,
  3. PermissionRequestOption permissionRequestOption = const PermissionRequestOption(),
  4. Key? key,
  5. AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder,
  6. bool useRootNavigator = true,
})

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:

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,
  );
}