class UserAuth { String username; String password; String accountType; String status; String deviceToken; String referralCode; UserAuth({ this.username, this.password, this.accountType, this.status, this.deviceToken, this.referralCode, }); UserAuth.fromJSON(Map json) : username = json['username'], password = json['password'], accountType = json['accountType'], status = json['status'], referralCode = json['referral'], deviceToken = json['deviceToken']; Map toJson() { final Map data = Map(); data['username'] = this.username; data['password'] = this.password; data['accountType'] = this.accountType; data['status'] = this.status; data['deviceToken'] = this.deviceToken; data['referral'] = this.referralCode; return data; } @override String toString() { return '{"username": "$username", "password": "$password","accountType": "$accountType", "status": "$status","deviceToken": "$deviceToken"}'; } }