3 July 2024
This commit is contained in:
@@ -1,39 +1,29 @@
|
||||
// ignore: file_names
|
||||
class AppUser {
|
||||
final int idUser;
|
||||
final String UserName;
|
||||
final int idusers;
|
||||
final String email;
|
||||
final int docOffice_id;
|
||||
final String fname;
|
||||
final String lname;
|
||||
final String title;
|
||||
|
||||
const AppUser({
|
||||
required this.idUser,
|
||||
required this.UserName,
|
||||
required this.docOffice_id,
|
||||
required this.fname,
|
||||
required this.lname,
|
||||
required this.title,
|
||||
});
|
||||
const AppUser(
|
||||
this.idusers,
|
||||
this.email,
|
||||
this.docOffice_id,
|
||||
this.fname,
|
||||
this.lname,
|
||||
this.title,
|
||||
);
|
||||
|
||||
factory AppUser.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
'idUser': int idUser,
|
||||
'UserName': String UserName,
|
||||
'docOffice_id': int docOffice_id,
|
||||
'fname': String fname,
|
||||
'lname': String lname,
|
||||
'title': String title,
|
||||
} =>
|
||||
AppUser(
|
||||
idUser: idUser,
|
||||
UserName: UserName,
|
||||
docOffice_id: docOffice_id,
|
||||
fname: fname,
|
||||
lname: lname,
|
||||
title: title,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
factory AppUser.fromJson(dynamic json) {
|
||||
return AppUser(
|
||||
json['idusers'],
|
||||
json['email'],
|
||||
json['docOffice_id'],
|
||||
json['fname'],
|
||||
json['lname'],
|
||||
json['title'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user