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

Future<List<Asset>?> showPickerAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path>>(
  1. BuildContext context, {
  2. Key? key,
  3. bool mounted = true,
  4. FlAssetsPickerCheckPermission? checkPermission,
  5. required AssetPickerBuilderDelegate<Asset, Path> delegate,
  6. bool useRootNavigator = true,
  7. AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder,
})

选择图片

Implementation

static Future<List<Asset>?> showPickerAssetsWithDelegate<Asset, Path,
        PickerProvider extends AssetPickerProvider<Asset, Path>>(
    BuildContext context,
    {Key? key,
    bool mounted = true,
    FlAssetsPickerCheckPermission? checkPermission,
    required AssetPickerBuilderDelegate<Asset, Path> delegate,
    bool useRootNavigator = true,
    AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder}) async {
  final permissionState =
      await checkPermission?.call(PickerFromType.assets) ?? true;
  if (!permissionState || !mounted) return null;
  return await AssetPicker.pickAssetsWithDelegate<Asset, Path,
          PickerProvider>(context,
      key: key,
      delegate: delegate,
      useRootNavigator: useRootNavigator,
      pageRouteBuilder: pageRouteBuilder);
}