date property
@JsonKey(required: true, fromJson: _parseDate), read / write
The event date.
On Android this is stored as a free-form string, and therefore could fail to parse. In such cases we set the date to 1970-01-01.
On iOS, this is stored in either contact.birthday
(for birthday) or
contact.dates
(for other dates such as anniversary) as date components
so parsing always succeeds. Additionally, dates can have no year
associated with them. In such cases noYear will be true.
Implementation
@JsonKey(required: true, fromJson: _parseDate)
DateTime date;