fromMap static method

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

Construct from Map.

Implementation

static ChatMember? 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 member_id = MessageSender.fromMap(_map['member_id'])!;
  var inviter_user_id = _map['inviter_user_id']! as int;
  var joined_chat_date = _map['joined_chat_date']! as int;
  var status = ChatMemberStatus.fromMap(_map['status'])!;
  return ChatMember(
    extra: extra,
    clientId: clientId,
    member_id: member_id,
    inviter_user_id: inviter_user_id,
    joined_chat_date: joined_chat_date,
    status: status,
  );
}