fromMap static method

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

Construct from Map.

Implementation

static ChatMemberStatusAdministrator? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var custom_title = _map['custom_title']! as String;
  var can_be_edited = _map['can_be_edited']! as bool;
  var rights = ChatAdministratorRights.fromMap(_map['rights'])!;
  return ChatMemberStatusAdministrator(
    extra: extra,
    clientId: clientId,
    custom_title: custom_title,
    can_be_edited: can_be_edited,
    rights: rights,
  );
}