pickAssets static method

Future<List<AssetEntity>?> pickAssets(
  1. BuildContext context, {
  2. Key? key,
  3. PermissionRequestOption? permissionRequestOption,
  4. AssetPickerConfig pickerConfig = const AssetPickerConfig(),
  5. bool useRootNavigator = true,
  6. AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilder,
})

Pick assets with the given pickerConfig. 根据给定的 pickerConfig 选择资源。

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<AssetEntity>?> pickAssets(
  BuildContext context, {
  Key? key,
  PermissionRequestOption? permissionRequestOption,
  AssetPickerConfig pickerConfig = const AssetPickerConfig(),
  bool useRootNavigator = true,
  AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilder,
}) {
  return _pickerDelegate.pickAssets(
    context,
    key: key,
    pickerConfig: pickerConfig,
    permissionRequestOption: permissionRequestOption,
    useRootNavigator: useRootNavigator,
    pageRouteBuilder: pageRouteBuilder,
  );
}