showPickerAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path> > static method
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, - AssetPickerPageRouteBuilder<
List< ? pageRouteBuilder,Asset> >
选择图片
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);
}