AssetPickerBuilderDelegate<Asset, Path> constructor

AssetPickerBuilderDelegate<Asset, Path>({
  1. required PermissionState initialPermission,
  2. int gridCount = 4,
  3. ThemeData? pickerTheme,
  4. SpecialItemPosition specialItemPosition = SpecialItemPosition.none,
  5. SpecialItemBuilder<Path>? specialItemBuilder,
  6. LoadingIndicatorBuilder? loadingIndicatorBuilder,
  7. AssetSelectPredicate<Asset>? selectPredicate,
  8. bool? shouldRevertGrid,
  9. LimitedPermissionOverlayPredicate? limitedPermissionOverlayPredicate,
  10. PathNameBuilder<AssetPathEntity>? pathNameBuilder,
  11. Color? themeColor,
  12. AssetPickerTextDelegate? textDelegate,
  13. Locale? locale,
})

Implementation

AssetPickerBuilderDelegate({
  required this.initialPermission,
  this.gridCount = 4,
  this.pickerTheme,
  this.specialItemPosition = SpecialItemPosition.none,
  this.specialItemBuilder,
  this.loadingIndicatorBuilder,
  this.selectPredicate,
  this.shouldRevertGrid,
  this.limitedPermissionOverlayPredicate,
  this.pathNameBuilder,
  Color? themeColor,
  AssetPickerTextDelegate? textDelegate,
  Locale? locale,
})  : assert(gridCount > 0, 'gridCount must be greater than 0.'),
      assert(
        pickerTheme == null || themeColor == null,
        'Theme and theme color cannot be set at the same time.',
      ),
      themeColor = pickerTheme?.colorScheme.secondary ??
          themeColor ??
          defaultThemeColorWeChat {
  Singleton.textDelegate =
      textDelegate ?? assetPickerTextDelegateFromLocale(locale);
}