toMap method
Converts to a map of date parts.
Returns: A Map<DatePart, int> with non-null parts.
Implementation
Map<DatePart, int> toMap() {
return {
if (year != null) DatePart.year: year!,
if (month != null) DatePart.month: month!,
if (day != null) DatePart.day: day!,
};
}