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