map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult animation(
- InputChatPhotoAnimation value
- required TResult previous(
- InputChatPhotoPrevious value
- required TResult static(
- InputChatPhotoStatic value
- required TResult sticker(
- InputChatPhotoSticker value
Implementation
TResult map<TResult extends Object?>({
required TResult Function(InputChatPhotoAnimation value) animation,
required TResult Function(InputChatPhotoPrevious value) previous,
required TResult Function(InputChatPhotoStatic value) static,
required TResult Function(InputChatPhotoSticker value) sticker,
}) {
switch (getConstructor()) {
case InputChatPhotoAnimation.constructor:
return animation.call(this as InputChatPhotoAnimation);
case InputChatPhotoPrevious.constructor:
return previous.call(this as InputChatPhotoPrevious);
case InputChatPhotoStatic.constructor:
return static.call(this as InputChatPhotoStatic);
case InputChatPhotoSticker.constructor:
return sticker.call(this as InputChatPhotoSticker);
}
throw StateError('not handled type Generator');
}