fromMap static method

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

Construct from Map.

Implementation

static ChatMemberStatusRestricted? 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 is_member = _map['is_member']! as bool;
  var restricted_until_date = _map['restricted_until_date']! as int;
  var permissions = ChatPermissions.fromMap(_map['permissions'])!;
  return ChatMemberStatusRestricted(
    extra: extra,
    clientId: clientId,
    is_member: is_member,
    restricted_until_date: restricted_until_date,
    permissions: permissions,
  );
}