maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult quiz(
- InputPollTypeQuiz value
- TResult regular(
- InputPollTypeRegular value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(InputPollTypeQuiz value)? quiz,
TResult Function(InputPollTypeRegular value)? regular,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case InputPollTypeQuiz.constructor:
if (quiz != null) {
return quiz.call(this as InputPollTypeQuiz);
}
break;
case InputPollTypeRegular.constructor:
if (regular != null) {
return regular.call(this as InputPollTypeRegular);
}
break;
}
return orElse.call();
}