fromMap static method

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

Construct from Map.

Implementation

static PublicChatType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'publicChatTypeIsLocationBased':
      return PublicChatTypeIsLocationBased.fromMap(_map);
    case 'publicChatTypeHasUsername':
      return PublicChatTypeHasUsername.fromMap(_map);
    case null:
    default:
      return null;
  }
}