toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, String> json = {
    'description': description,
    'image_url': imageUrl,
  };

  if (base64Image.isNotEmpty) {
    json['base64Image'] = base64Image;
  }

  if (locationId.isNotEmpty) {
    json['location_id'] = locationId;
  }

  if (practiceId.isNotEmpty) {
    json['practice_id'] = practiceId;
  }

  return json;
}