map<TResult extends Object?> method

TResult map<TResult extends Object?>({
  1. required TResult supergroup(
    1. ChatStatisticsSupergroup value
    ),
  2. required TResult channel(
    1. ChatStatisticsChannel value
    ),
})

Implementation

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