54 lines
1.1 KiB
Dart
54 lines
1.1 KiB
Dart
class UserInfoIncompleteModel {
|
|
UserInfoIncompleteModel({
|
|
this.status,
|
|
this.error,
|
|
this.data,
|
|
});
|
|
|
|
final int? status;
|
|
final bool? error;
|
|
final Data? data;
|
|
|
|
factory UserInfoIncompleteModel.fromJson(Map<String, dynamic> json) => UserInfoIncompleteModel(
|
|
status: json["status"],
|
|
error: json["error"],
|
|
data: Data.fromJson(json["data"][0]),
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"status": status,
|
|
"error": error,
|
|
"data": data == null
|
|
? null
|
|
: [data!.toJson()],
|
|
};
|
|
}
|
|
|
|
class Data {
|
|
Data({
|
|
this.idUser,
|
|
this.fullname,
|
|
this.email,
|
|
this.phone,
|
|
});
|
|
|
|
final String? idUser;
|
|
final String? fullname;
|
|
final String? email;
|
|
final String? phone;
|
|
|
|
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
|
idUser: json["id_user"],
|
|
fullname: json["full_name"],
|
|
email: json["email"],
|
|
phone: json["phone"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id_user": idUser,
|
|
"full_name": fullname,
|
|
"email": email,
|
|
"phone": phone,
|
|
};
|
|
}
|