Contact.fromMap constructor
Contact.fromMap(
- Map m
Implementation
Contact.fromMap(Map m) {
identifier = m["identifier"];
displayName = m["displayName"];
givenName = m["givenName"];
middleName = m["middleName"];
familyName = m["familyName"];
prefix = m["prefix"];
suffix = m["suffix"];
company = m["company"];
jobTitle = m["jobTitle"];
androidAccountTypeRaw = m["androidAccountType"];
androidAccountType = accountTypeFromString(androidAccountTypeRaw);
androidAccountName = m["androidAccountName"];
emails = (m["emails"] as List?)?.map((m) => Item.fromMap(m)).toList();
phones = (m["phones"] as List?)?.map((m) => Item.fromMap(m)).toList();
postalAddresses = (m["postalAddresses"] as List?)
?.map((m) => PostalAddress.fromMap(m))
.toList();
avatar = m["avatar"];
note = m["note"];
socialProfiles = (m["socialProfiles"] as List?)
?.map((m) => SocialProfile.fromMap(m))
.toList();
try {
birthday = m["birthday"] != null ? DateTime.parse(m["birthday"]) : null;
} catch (e) {
birthday = null;
}
}