map<TResult extends Object?> method

TResult map<TResult extends Object?>({
  1. required TResult previous(
    1. InputChatPhotoPrevious value
    ),
  2. required TResult static(
    1. InputChatPhotoStatic value
    ),
  3. required TResult animation(
    1. InputChatPhotoAnimation value
    ),
  4. required TResult sticker(
    1. InputChatPhotoSticker value
    ),
})

Implementation

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