DefaultAssetPickerBuilderDelegate constructor
DefaultAssetPickerBuilderDelegate({
- required DefaultAssetPickerProvider provider,
- required PermissionState initialPermission,
- int gridCount = 4,
- ThemeData? pickerTheme,
- SpecialItemPosition specialItemPosition = SpecialItemPosition.none,
- SpecialItemBuilder<
AssetPathEntity> ? specialItemBuilder, - LoadingIndicatorBuilder? loadingIndicatorBuilder,
- AssetSelectPredicate<
AssetEntity> ? selectPredicate, - bool? shouldRevertGrid,
- LimitedPermissionOverlayPredicate? limitedPermissionOverlayPredicate,
- PathNameBuilder<
AssetPathEntity> ? pathNameBuilder, - AssetsChangeCallback<
AssetPathEntity> ? assetsChangeCallback, - AssetsChangeRefreshPredicate<
AssetPathEntity> ? assetsChangeRefreshPredicate, - Color? themeColor,
- AssetPickerTextDelegate? textDelegate,
- Locale? locale,
- ThumbnailSize gridThumbnailSize = defaultAssetGridPreviewSize,
- ThumbnailSize? previewThumbnailSize,
- SpecialPickerType? specialPickerType,
- bool keepScrollOffset = false,
- bool shouldAutoplayPreview = false,
Implementation
DefaultAssetPickerBuilderDelegate({
required this.provider,
required super.initialPermission,
super.gridCount,
super.pickerTheme,
super.specialItemPosition,
super.specialItemBuilder,
super.loadingIndicatorBuilder,
super.selectPredicate,
super.shouldRevertGrid,
super.limitedPermissionOverlayPredicate,
super.pathNameBuilder,
super.assetsChangeCallback,
super.assetsChangeRefreshPredicate,
super.themeColor,
super.textDelegate,
super.locale,
this.gridThumbnailSize = defaultAssetGridPreviewSize,
this.previewThumbnailSize,
this.specialPickerType,
this.keepScrollOffset = false,
this.shouldAutoplayPreview = false,
}) {
// Add the listener if [keepScrollOffset] is true.
if (keepScrollOffset) {
gridScrollController.addListener(keepScrollOffsetListener);
}
}