DefaultAssetPickerBuilderDelegate constructor

DefaultAssetPickerBuilderDelegate({
  1. required DefaultAssetPickerProvider provider,
  2. required PermissionState initialPermission,
  3. int gridCount = 4,
  4. ThemeData? pickerTheme,
  5. SpecialItemPosition specialItemPosition = SpecialItemPosition.none,
  6. SpecialItemBuilder<AssetPathEntity>? specialItemBuilder,
  7. LoadingIndicatorBuilder? loadingIndicatorBuilder,
  8. AssetSelectPredicate<AssetEntity>? selectPredicate,
  9. bool? shouldRevertGrid,
  10. LimitedPermissionOverlayPredicate? limitedPermissionOverlayPredicate,
  11. PathNameBuilder<AssetPathEntity>? pathNameBuilder,
  12. AssetsChangeCallback<AssetPathEntity>? assetsChangeCallback,
  13. AssetsChangeRefreshPredicate<AssetPathEntity>? assetsChangeRefreshPredicate,
  14. Color? themeColor,
  15. AssetPickerTextDelegate? textDelegate,
  16. Locale? locale,
  17. ThumbnailSize gridThumbnailSize = defaultAssetGridPreviewSize,
  18. ThumbnailSize? previewThumbnailSize,
  19. SpecialPickerType? specialPickerType,
  20. bool keepScrollOffset = false,
  21. 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);
  }
}