google preperation 1
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
class Contact {
|
||||
final String firstName;
|
||||
final String lastName;
|
||||
final String phone;
|
||||
final String email;
|
||||
|
||||
const Contact({
|
||||
required this.firstName,
|
||||
required this.lastName,
|
||||
required this.phone,
|
||||
required this.email,
|
||||
});
|
||||
|
||||
String get fullName => '$firstName $lastName';
|
||||
|
||||
factory Contact.fromJson(Map<String, dynamic> json) => Contact(
|
||||
firstName: json['firstName'] ?? '',
|
||||
lastName: json['lastName'] ?? '',
|
||||
phone: json['phone'] ?? '',
|
||||
email: json['email'] ?? '',
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user