maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult animation(
- InputChatPhotoAnimation value
- TResult previous(
- InputChatPhotoPrevious value
- TResult static(
- InputChatPhotoStatic value
- TResult sticker(
- InputChatPhotoSticker value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(InputChatPhotoAnimation value)? animation,
TResult Function(InputChatPhotoPrevious value)? previous,
TResult Function(InputChatPhotoStatic value)? static,
TResult Function(InputChatPhotoSticker value)? sticker,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case InputChatPhotoAnimation.constructor:
if (animation != null) {
return animation.call(this as InputChatPhotoAnimation);
}
break;
case InputChatPhotoPrevious.constructor:
if (previous != null) {
return previous.call(this as InputChatPhotoPrevious);
}
break;
case InputChatPhotoStatic.constructor:
if (static != null) {
return static.call(this as InputChatPhotoStatic);
}
break;
case InputChatPhotoSticker.constructor:
if (sticker != null) {
return sticker.call(this as InputChatPhotoSticker);
}
break;
}
return orElse.call();
}