AssetPickerBuilderDelegate<A, P> constructor
AssetPickerBuilderDelegate<A, P> ({
- required AssetPickerProvider<
A, P> provider, - int gridCount = 4,
- Color? themeColor,
- AssetsPickerTextDelegate? textDelegate,
- ThemeData? pickerTheme,
- SpecialItemPosition specialItemPosition = SpecialItemPosition.none,
- WidgetBuilder? specialItemBuilder,
- IndicatorBuilder? loadingIndicatorBuilder,
- 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();
}