ImageParamsPatterns extension

Adds pattern-matching-related methods to ImageParams.

on

Methods

map<TResult extends Object?>(TResult $default(_ImageParams value)) → TResult

Available on ImageParams, provided by the ImageParamsPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ImageParams value)?) → TResult?

Available on ImageParams, provided by the ImageParamsPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ImageParams value)?, {required TResult orElse()}) → TResult

Available on ImageParams, provided by the ImageParamsPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(double? width, double? height, double? size, BoxFit? fit, BorderRadius? borderRadius, BoxShape? shape, bool enableMemoryCache, String? heroTag, bool isSelected, Widget? errorWidget, VoidCallback? onTap, Color? color, bool clearMemoryCacheIfFailed, bool clearMemoryCacheWhenDispose, bool gaplessPlayback, BlendMode? colorBlendMode, FilterQuality filterQuality, double? scale, Map<String, String> headers, bool cache, int retries, Duration? timeLimit, Duration timeRetry, CancellationToken? cancelToken, String? cacheKey, bool printError, bool cacheRawData, String? imageCacheName, Duration? cacheMaxAge, int? cacheWidth, int? cacheHeight, double? compressionRatio, int? maxBytes, String? package, AssetBundle? bundle, CustomCompletedWidget? customCompletedWidget, Widget? customLoadingWidget, InitEditorConfigHandler? initEditorConfigHandler, Key? extendedImageEditorKey, ExtendedImageMode? mode)?, {required TResult orElse()}) → TResult

Available on ImageParams, provided by the ImageParamsPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(double? width, double? height, double? size, BoxFit? fit, BorderRadius? borderRadius, BoxShape? shape, bool enableMemoryCache, String? heroTag, bool isSelected, Widget? errorWidget, VoidCallback? onTap, Color? color, bool clearMemoryCacheIfFailed, bool clearMemoryCacheWhenDispose, bool gaplessPlayback, BlendMode? colorBlendMode, FilterQuality filterQuality, double? scale, Map<String, String> headers, bool cache, int retries, Duration? timeLimit, Duration timeRetry, CancellationToken? cancelToken, String? cacheKey, bool printError, bool cacheRawData, String? imageCacheName, Duration? cacheMaxAge, int? cacheWidth, int? cacheHeight, double? compressionRatio, int? maxBytes, String? package, AssetBundle? bundle, CustomCompletedWidget? customCompletedWidget, Widget? customLoadingWidget, InitEditorConfigHandler? initEditorConfigHandler, Key? extendedImageEditorKey, ExtendedImageMode? mode)) → TResult

Available on ImageParams, provided by the ImageParamsPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(double? width, double? height, double? size, BoxFit? fit, BorderRadius? borderRadius, BoxShape? shape, bool enableMemoryCache, String? heroTag, bool isSelected, Widget? errorWidget, VoidCallback? onTap, Color? color, bool clearMemoryCacheIfFailed, bool clearMemoryCacheWhenDispose, bool gaplessPlayback, BlendMode? colorBlendMode, FilterQuality filterQuality, double? scale, Map<String, String> headers, bool cache, int retries, Duration? timeLimit, Duration timeRetry, CancellationToken? cancelToken, String? cacheKey, bool printError, bool cacheRawData, String? imageCacheName, Duration? cacheMaxAge, int? cacheWidth, int? cacheHeight, double? compressionRatio, int? maxBytes, String? package, AssetBundle? bundle, CustomCompletedWidget? customCompletedWidget, Widget? customLoadingWidget, InitEditorConfigHandler? initEditorConfigHandler, Key? extendedImageEditorKey, ExtendedImageMode? mode)?) → TResult?

Available on ImageParams, provided by the ImageParamsPatterns extension

A variant of when that fallback to returning null