showPickerAssets static method
Future<List<AssetEntity> ?>
showPickerAssets(
- BuildContext context, {
- bool mounted = true,
- FlAssetsPickerCheckPermission? checkPermission,
- Key? key,
- AssetPickerConfig pickerConfig = const AssetPickerConfig(),
- AssetPickerPageRouteBuilder<
List< ? pageRouteBuilder,AssetEntity> >
选择图片
Implementation
static Future<List<AssetEntity>?> showPickerAssets(BuildContext context,
{bool useRootNavigator = true,
bool mounted = true,
FlAssetsPickerCheckPermission? checkPermission,
Key? key,
AssetPickerConfig pickerConfig = const AssetPickerConfig(),
AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilder}) async {
final permissionState =
await checkPermission?.call(PickerFromType.assets) ?? true;
if (!permissionState || !mounted) return null;
return await AssetPicker.pickAssets(context,
key: key,
pickerConfig: pickerConfig,
useRootNavigator: useRootNavigator,
pageRouteBuilder: pageRouteBuilder);
}