toJson method

  1. @override
Map<String, dynamic> toJson([
  1. dynamic extra
])
override

Implementation

@override
Map<String, dynamic> toJson([dynamic extra]) {
  return {
    "@type": CONSTRUCTOR,
    "id": id,
    "first_name": firstName,
    "last_name": lastName,
    "username": username,
    "phone_number": phoneNumber,
    "status": status.toJson(),
    "profile_photo": profilePhoto?.toJson(),
    "is_contact": isContact,
    "is_mutual_contact": isMutualContact,
    "is_verified": isVerified,
    "is_support": isSupport,
    "restriction_reason": restrictionReason,
    "is_scam": isScam,
    "is_fake": isFake,
    "have_access": haveAccess,
    "type": type.toJson(),
    "language_code": languageCode,
  };
}