toMap method
Creates a Map<String, dynamic> map
representation of this instance.
This can be useful for saving the instance in a database.
Implementation
Map<String, dynamic> toMap() => <String, dynamic>{
_addressesKey: [
for (Address address in addresses) address.toMap(),
],
_birthdayKey: birthday?.toIso8601String(),
_chatsKey: [
for (Chat chat in chats) chat.toMap(),
],
_customFieldsKey: [
for (CustomField customField in customFields) customField.toMap(),
],
_emailsKey: [
for (Email email in emails) email.toMap(),
],
_eventsKey: [
for (ContactEvent event in events) event.toMap(),
],
_internetCallsKey: [
for (InternetCall internetCall in internetCalls) internetCall.toMap(),
],
_jobsKey: [
for (Job job in jobs) job.toMap(),
],
_nameKey: name.toMap(),
_notesKey: notes,
_phonesKey: [
for (Phone phone in phones) phone.toMap(),
],
_relationshipsKey: [
for (Relationship relationship in relationships) relationship.toMap(),
],
_websitesKey: [
for (Website website in websites) website.toMap(),
],
};