maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult chatTheme(
- BackgroundTypeChatTheme value
- TResult fill(
- BackgroundTypeFill value
- TResult pattern(
- BackgroundTypePattern value
- TResult wallpaper(
- BackgroundTypeWallpaper value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(BackgroundTypeChatTheme value)? chatTheme,
TResult Function(BackgroundTypeFill value)? fill,
TResult Function(BackgroundTypePattern value)? pattern,
TResult Function(BackgroundTypeWallpaper value)? wallpaper,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case BackgroundTypeChatTheme.constructor:
if (chatTheme != null) {
return chatTheme.call(this as BackgroundTypeChatTheme);
}
break;
case BackgroundTypeFill.constructor:
if (fill != null) {
return fill.call(this as BackgroundTypeFill);
}
break;
case BackgroundTypePattern.constructor:
if (pattern != null) {
return pattern.call(this as BackgroundTypePattern);
}
break;
case BackgroundTypeWallpaper.constructor:
if (wallpaper != null) {
return wallpaper.call(this as BackgroundTypeWallpaper);
}
break;
}
return orElse.call();
}