fromMap static method

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

Construct from Map.

Implementation

static ChatMemberStatus? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'chatMemberStatusCreator':
      return ChatMemberStatusCreator.fromMap(_map);
    case 'chatMemberStatusBanned':
      return ChatMemberStatusBanned.fromMap(_map);
    case 'chatMemberStatusAdministrator':
      return ChatMemberStatusAdministrator.fromMap(_map);
    case 'chatMemberStatusMember':
      return ChatMemberStatusMember.fromMap(_map);
    case 'chatMemberStatusLeft':
      return ChatMemberStatusLeft.fromMap(_map);
    case 'chatMemberStatusRestricted':
      return ChatMemberStatusRestricted.fromMap(_map);
    case null:
    default:
      return null;
  }
}