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. Key? key,
  3. required AssetPickerBuilderDelegate<Asset, Path> delegate,
  4. bool useRootNavigator = true,
  5. AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder,
})

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, {
  Key? key,
  required AssetPickerBuilderDelegate<Asset, Path> delegate,
  bool useRootNavigator = true,
  AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder,
}) {
  return _pickerDelegate.pickAssetsWithDelegate<Asset, Path, PickerProvider>(
    context,
    key: key,
    delegate: delegate,
    useRootNavigator: useRootNavigator,
    pageRouteBuilder: pageRouteBuilder,
  );
}