toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (title != null) 'title': title,
    if (description != null) 'description': description,
    if (recommendation != null) 'recommendation': recommendation,
    if (location != null)
      'location': location!.map((l) => l.toJson()).toList(),
  };
}