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
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ImageParams value)?) → TResult? -
Available on ImageParams, provided by the ImageParamsPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_ImageParams value)?, {required TResult orElse()}) → TResult -
Available on ImageParams, provided by the ImageParamsPatterns extension
A variant ofmap
that fallback to returningorElse
. -
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 ofwhen
that fallback to anorElse
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
Aswitch
-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 ofwhen
that fallback to returningnull