Creates a json map from a Task
Map<String, dynamic> toJson() => <String, dynamic>{'id': id, 'title': title, 'completed': completed};