fromMap static method

TopChatCategory? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static TopChatCategory? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'topChatCategoryForwardChats':
      return TopChatCategoryForwardChats.fromMap(_map);
    case 'topChatCategoryChannels':
      return TopChatCategoryChannels.fromMap(_map);
    case 'topChatCategoryUsers':
      return TopChatCategoryUsers.fromMap(_map);
    case 'topChatCategoryCalls':
      return TopChatCategoryCalls.fromMap(_map);
    case 'topChatCategoryInlineBots':
      return TopChatCategoryInlineBots.fromMap(_map);
    case 'topChatCategoryBots':
      return TopChatCategoryBots.fromMap(_map);
    case 'topChatCategoryGroups':
      return TopChatCategoryGroups.fromMap(_map);
    case null:
    default:
      return null;
  }
}