toMap method
Implementation
Map<String, dynamic> toMap() {
return {
if (id != null) 'id': id,
'type': type.name,
'title': title,
'body': body,
if (icon != null) 'icon': icon,
if (priority != null) 'priority': priority,
if (tags != null) 'tags': tags,
if (actionText != null) 'actionText': actionText,
if (actionId != null) 'actionId': actionId,
};
}