toJson method

Map<String, dynamic> toJson()

to convert user object into json data

Implementation

Map<String, dynamic> toJson() => {
      "username": userName,
      "email": email,
      "first_name": firstName,
      "last_name": lastName,
      "is_active": isActive,
      "type": type,
      "phone": phone,
      "business": business,
      "photo": photo,
      "franchise": franchise,
      "approved": approved,
      "is_tester": isTester,
      "coin": coin,
      "telegram_username": telegramUserName,
      "referral_code": referralCode,
      "refer_by": referBy,
      "social_profiles": socialProfiles,
      "setting": setting.toJson(),
      "token": token,
      "id": id,
    };