toJson method

Map<String, dynamic> toJson()

Converts this Disease to a JSON map.

Used for serializing disease data for storage or API transmission.

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'name': name,
    'description': description,
    'symptoms': symptoms,
    'treatment': treatment,
    'prevention': prevention,
    'vectors': vectors,
    'prevalence': prevalence,
    'image_url': imageUrl,
  };
}