28 lines
570 B
Dart
28 lines
570 B
Dart
class ContactList {
|
|
final int id;
|
|
final String name;
|
|
final dynamic email;
|
|
final dynamic image1920;
|
|
|
|
|
|
ContactList({required this.id, required this.name, required this.email, required this.image1920});
|
|
|
|
factory ContactList.fromJson(Map<String, dynamic> json) {
|
|
return ContactList(
|
|
id: json['id'],
|
|
name: json['name'],
|
|
email: json['email'],
|
|
image1920: json['image_1920'],
|
|
);
|
|
}
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'id': id,
|
|
'name': name,
|
|
'email': email,
|
|
'image1920': image1920,
|
|
};
|
|
}
|
|
|
|
}
|