Files
SDKmuta/lib/models/contact.dart
T
2026-10-26 20:48:16 +01:00

23 lines
529 B
Dart

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'] ?? '',
);
}