maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult gif(
- ThumbnailFormatGif value
- TResult jpeg(
- ThumbnailFormatJpeg value
- TResult mpeg4(
- ThumbnailFormatMpeg4 value
- TResult png(
- ThumbnailFormatPng value
- TResult tgs(
- ThumbnailFormatTgs value
- TResult webm(
- ThumbnailFormatWebm value
- TResult webp(
- ThumbnailFormatWebp value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(ThumbnailFormatGif value)? gif,
TResult Function(ThumbnailFormatJpeg value)? jpeg,
TResult Function(ThumbnailFormatMpeg4 value)? mpeg4,
TResult Function(ThumbnailFormatPng value)? png,
TResult Function(ThumbnailFormatTgs value)? tgs,
TResult Function(ThumbnailFormatWebm value)? webm,
TResult Function(ThumbnailFormatWebp value)? webp,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case ThumbnailFormatGif.constructor:
if (gif != null) {
return gif.call(this as ThumbnailFormatGif);
}
break;
case ThumbnailFormatJpeg.constructor:
if (jpeg != null) {
return jpeg.call(this as ThumbnailFormatJpeg);
}
break;
case ThumbnailFormatMpeg4.constructor:
if (mpeg4 != null) {
return mpeg4.call(this as ThumbnailFormatMpeg4);
}
break;
case ThumbnailFormatPng.constructor:
if (png != null) {
return png.call(this as ThumbnailFormatPng);
}
break;
case ThumbnailFormatTgs.constructor:
if (tgs != null) {
return tgs.call(this as ThumbnailFormatTgs);
}
break;
case ThumbnailFormatWebm.constructor:
if (webm != null) {
return webm.call(this as ThumbnailFormatWebm);
}
break;
case ThumbnailFormatWebp.constructor:
if (webp != null) {
return webp.call(this as ThumbnailFormatWebp);
}
break;
}
return orElse.call();
}