Serializes the goal into a persistence-friendly map.
Map<String, dynamic> toMap() => { 'task': task, 'input': input, };