AssetPickerBuilderDelegate<A, P> constructor

AssetPickerBuilderDelegate<A, P>({
  1. required AssetPickerProvider<A, P> provider,
  2. int gridCount = 4,
  3. Color? themeColor,
  4. AssetsPickerTextDelegate? textDelegate,
  5. ThemeData? pickerTheme,
  6. SpecialItemPosition specialItemPosition = SpecialItemPosition.none,
  7. WidgetBuilder? specialItemBuilder,
  8. IndicatorBuilder? loadingIndicatorBuilder,
  9. bool allowSpecialItemWhenEmpty = false,
})

Implementation

AssetPickerBuilderDelegate({
  required this.provider,
  this.gridCount = 4,
  Color? themeColor,
  AssetsPickerTextDelegate? textDelegate,
  this.pickerTheme,
  this.specialItemPosition = SpecialItemPosition.none,
  this.specialItemBuilder,
  this.loadingIndicatorBuilder,
  this.allowSpecialItemWhenEmpty = false,
})  : assert(
        pickerTheme == null || themeColor == null,
        'Theme and theme color cannot be set at the same time.',
      ),
      themeColor =
          pickerTheme?.colorScheme.secondary ?? themeColor ?? C.themeColor {
  Constants.textDelegate = textDelegate ?? DefaultAssetsPickerTextDelegate();
}