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 json) => Contact( firstName: json['firstName'] ?? '', lastName: json['lastName'] ?? '', phone: json['phone'] ?? '', email: json['email'] ?? '', ); }