class TwitterUser { String firstname; String surname; String email; String gender; String username; String userGUID; String country; String pictureUri; String deviceToken; String referralCode; TwitterUser( {this.firstname, this.surname, this.email, this.gender, this.username, this.userGUID, this.country, this.pictureUri, this.referralCode, this.deviceToken}); factory TwitterUser.fromJSON(Map json) { return TwitterUser( firstname: json['firstname'], surname: json['surname'], email: json['email'], gender: json['gender'], userGUID: json['userGUID'], username: json['username'], country: json['country'], pictureUri: json['pictureuri'], referralCode: json['referral'], deviceToken: json['devicetoken']); } Map toJson() { final Map data = Map(); data['firstname'] = this.firstname; data['surname'] = this.surname; data['email'] = this.email; data['gender'] = this.gender; data['userGUID'] = this.userGUID; data['username'] = this.username; data['country'] = this.country; data['pictureuri'] = this.pictureUri; data['devicetoken'] = this.deviceToken; data['referral'] = this.referralCode; return data; } }