Disease class
Represents a disease that can be transmitted by mosquitoes or other vectors.
This model contains comprehensive information about a specific disease including its symptoms, treatment options, prevention methods, and associated vectors. It's used throughout the application to display disease information to users and provide context for mosquito identification results.
Usage Example
final dengue = Disease(
id: 'dengue',
name: 'Dengue Fever',
description: 'A viral infection transmitted by Aedes mosquitoes...',
symptoms: 'High fever, severe headache, muscle and joint pain...',
treatment: 'Supportive care, pain relief, fluid replacement...',
prevention: 'Eliminate standing water, use mosquito repellent...',
vectors: ['aedes_aegypti', 'aedes_albopictus'],
prevalence: 'Endemic in tropical and subtropical regions',
imageUrl: 'assets/images/diseases/dengue.jpg',
);
Data Integration
Disease information is integrated with:
- MosquitoSpecies for vector-disease relationships
- ClassificationResult to show health risks
- External health databases and WHO data
See also:
- MosquitoSpecies for vector species information
- ClassificationResult for disease context in identification
Constructors
-
Disease({required String id, required String name, required String description, required String symptoms, required String treatment, required String prevention, required List<
String> vectors, required String prevalence, required String imageUrl}) - Creates a new Disease instance.
-
Disease.fromJson(Map<
String, dynamic> json) -
Creates a Disease from a JSON map.
factory
Properties
- description → String
-
Detailed description of the disease.
final
- hashCode → int
-
Returns the hash code for this disease.
no setteroverride
- id → String
-
Unique identifier for the disease.
final
- imageUrl → String
-
URL or path to the disease-related image.
final
- name → String
-
Common name of the disease.
final
- prevalence → String
-
Geographic prevalence and distribution information.
final
- prevention → String
-
Prevention methods and strategies.
final
- primaryVector → String
-
Gets the primary vector species for this disease.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symptoms → String
-
Clinical symptoms and manifestations.
final
- treatment → String
-
Treatment and management options.
final
-
vectors
→ List<
String> -
List of vector species IDs that can transmit this disease.
final
Methods
-
isTransmittedBy(
String speciesId) → bool - Checks if this disease is transmitted by a specific mosquito species.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this Disease to a JSON map.
-
toString(
) → String -
Returns a string representation of this disease.
override
Operators
-
operator ==(
Object other) → bool -
Checks if two Disease instances are equal.
override