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 json) => Message( id: json["id"], fullName: json["name"], email: json["username"], ); Map toJson() => { "id": id, "name": fullName, "username": email, }; @override String toString() { return ' $id'; } }