map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult success(),
- required TResult userAlreadyParticipant(),
- required TResult userPrivacyRestricted(),
- required TResult userWasBanned(),
Implementation
TResult map<TResult extends Object?>({
required TResult Function(InviteGroupCallParticipantResultSuccess value)
success,
required TResult Function(
InviteGroupCallParticipantResultUserAlreadyParticipant value,
)
userAlreadyParticipant,
required TResult Function(
InviteGroupCallParticipantResultUserPrivacyRestricted value,
)
userPrivacyRestricted,
required TResult Function(
InviteGroupCallParticipantResultUserWasBanned value,
)
userWasBanned,
}) {
switch (getConstructor()) {
case InviteGroupCallParticipantResultSuccess.constructor:
return success.call(this as InviteGroupCallParticipantResultSuccess);
case InviteGroupCallParticipantResultUserAlreadyParticipant.constructor:
return userAlreadyParticipant.call(
this as InviteGroupCallParticipantResultUserAlreadyParticipant,
);
case InviteGroupCallParticipantResultUserPrivacyRestricted.constructor:
return userPrivacyRestricted.call(
this as InviteGroupCallParticipantResultUserPrivacyRestricted,
);
case InviteGroupCallParticipantResultUserWasBanned.constructor:
return userWasBanned.call(
this as InviteGroupCallParticipantResultUserWasBanned,
);
}
throw StateError('not handled type Generator');
}