Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
53
lib/models/user_info_incomplete_model.dart
Normal file
53
lib/models/user_info_incomplete_model.dart
Normal file
@ -0,0 +1,53 @@
|
||||
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,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user