toJson method

Map<String, dynamic> toJson()

Converts the task to a JSON-compatible map for persistence.

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'title': title,
    'subtitle': subtitle,
  };
}