ChatInviteLink.fromJson constructor

ChatInviteLink.fromJson(
  1. Map<String, dynamic> json
)

Creates a new ChatInviteLink object from json.

Implementation

factory ChatInviteLink.fromJson(Map<String, dynamic> json) {
  return ChatInviteLink(
    inviteLink: json['invite_link'],
    creator: json['creator'] != null ? User.fromJson(json['creator']) : null,
    createsJoinRequest: json['creates_join_request'],
    isPrimary: json['is_primary'],
    isRevoked: json['is_revoked'],
    name: json['name'],
    expireDate: json['expire_date'],
    memberLimit: json['member_limit'],
    pendingMemberCount: json['pending_member_count'],
  );
}