map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult closed(
- SecretChatStateClosed value
- required TResult pending(
- SecretChatStatePending value
- required TResult ready(
- SecretChatStateReady value
Implementation
TResult map<TResult extends Object?>({
required TResult Function(SecretChatStateClosed value) closed,
required TResult Function(SecretChatStatePending value) pending,
required TResult Function(SecretChatStateReady value) ready,
}) {
switch (getConstructor()) {
case SecretChatStateClosed.constructor:
return closed.call(this as SecretChatStateClosed);
case SecretChatStatePending.constructor:
return pending.call(this as SecretChatStatePending);
case SecretChatStateReady.constructor:
return ready.call(this as SecretChatStateReady);
}
throw StateError('not handled type Generator');
}