toJson method

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

Implementation

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