140 lines
3.4 KiB
Dart
140 lines
3.4 KiB
Dart
class GetEditProfileIndi {
|
|
String? status;
|
|
int? statusCode;
|
|
String? message;
|
|
Data? data;
|
|
|
|
GetEditProfileIndi({this.status, this.statusCode, this.message, this.data});
|
|
|
|
GetEditProfileIndi.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
statusCode = json['status_code'];
|
|
message = json['message'];
|
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['status'] = this.status;
|
|
data['status_code'] = this.statusCode;
|
|
data['message'] = this.message;
|
|
if (this.data != null) {
|
|
data['data'] = this.data!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Data {
|
|
int? id;
|
|
String? userName;
|
|
String? fullName;
|
|
String? gender;
|
|
String? dateOfBirth;
|
|
List<Interest>? interest;
|
|
String? about;
|
|
String? position;
|
|
String? trainingScores;
|
|
String? height;
|
|
String? weight;
|
|
String? battingAverage;
|
|
Follows? follows;
|
|
|
|
Data(
|
|
{this.id,
|
|
this.userName,
|
|
this.fullName,
|
|
this.gender,
|
|
this.dateOfBirth,
|
|
this.interest,
|
|
this.about,
|
|
this.position,
|
|
this.trainingScores,
|
|
this.height,
|
|
this.weight,
|
|
this.battingAverage,
|
|
this.follows});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
userName = json['user_name'];
|
|
fullName = json['full_name'];
|
|
gender = json['gender'];
|
|
dateOfBirth = json['date_of_birth'];
|
|
if (json['interest'] != null) {
|
|
interest = <Interest>[];
|
|
json['interest'].forEach((v) {
|
|
interest!.add(new Interest.fromJson(v));
|
|
});
|
|
}
|
|
about = json['about'];
|
|
position = json['position'];
|
|
trainingScores = json['training_scores'];
|
|
height = json['height'];
|
|
weight = json['weight'];
|
|
battingAverage = json['batting_average'];
|
|
follows =
|
|
json['follows'] != null ? new Follows.fromJson(json['follows']) : null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['user_name'] = this.userName;
|
|
data['full_name'] = this.fullName;
|
|
data['gender'] = this.gender;
|
|
data['date_of_birth'] = this.dateOfBirth;
|
|
if (this.interest != null) {
|
|
data['interest'] = this.interest!.map((v) => v.toJson()).toList();
|
|
}
|
|
data['about'] = this.about;
|
|
data['position'] = this.position;
|
|
data['training_scores'] = this.trainingScores;
|
|
data['height'] = this.height;
|
|
data['weight'] = this.weight;
|
|
data['batting_average'] = this.battingAverage;
|
|
if (this.follows != null) {
|
|
data['follows'] = this.follows!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Interest {
|
|
int? id;
|
|
String? name;
|
|
|
|
Interest({this.id, this.name});
|
|
|
|
Interest.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['name'] = this.name;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Follows {
|
|
int? following;
|
|
int? followers;
|
|
|
|
Follows({this.following, this.followers});
|
|
|
|
Follows.fromJson(Map<String, dynamic> json) {
|
|
following = json['following'];
|
|
followers = json['followers'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['following'] = this.following;
|
|
data['followers'] = this.followers;
|
|
return data;
|
|
}
|
|
}
|