mobileapplicationPassvault/lib/modelclasses/usr_list_model.dart

33 lines
589 B
Dart
Raw Normal View History

2024-04-12 05:23:32 +00:00
class Message {
int id;
String fullName;
String email;
bool isChecked;
bool isEnabled;
Message({
required this.id,
required this.fullName,
required this.email,
this.isChecked = false,
this.isEnabled = true,
});
factory Message.fromJson(Map<String, dynamic> json) => Message(
id: json["id"],
fullName: json["name"],
email: json["username"],
);
Map<String, dynamic> toJson() => {
"id": id,
"name": fullName,
"username": email,
};
@override
String toString() {
return ' $id';
}
}