maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult bot(
- AffiliateTypeBot value
- TResult channel(
- AffiliateTypeChannel value
- TResult currentUser(
- AffiliateTypeCurrentUser value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(AffiliateTypeBot value)? bot,
TResult Function(AffiliateTypeChannel value)? channel,
TResult Function(AffiliateTypeCurrentUser value)? currentUser,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case AffiliateTypeBot.constructor:
if (bot != null) {
return bot.call(this as AffiliateTypeBot);
}
break;
case AffiliateTypeChannel.constructor:
if (channel != null) {
return channel.call(this as AffiliateTypeChannel);
}
break;
case AffiliateTypeCurrentUser.constructor:
if (currentUser != null) {
return currentUser.call(this as AffiliateTypeCurrentUser);
}
break;
}
return orElse.call();
}