map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult photo(
- InputStoryContentPhoto value
- required TResult video(
- InputStoryContentVideo value
Implementation
TResult map<TResult extends Object?>({
required TResult Function(InputStoryContentPhoto value) photo,
required TResult Function(InputStoryContentVideo value) video,
}) {
switch (getConstructor()) {
case InputStoryContentPhoto.constructor:
return photo.call(this as InputStoryContentPhoto);
case InputStoryContentVideo.constructor:
return video.call(this as InputStoryContentVideo);
}
throw StateError('not handled type Generator');
}