MosquitoSpecies class
Represents a species of mosquito with detailed biological and ecological information.
This model contains comprehensive data about a mosquito species including its scientific classification, habitat preferences, geographical distribution, and the diseases it can transmit. It's used for displaying species information and providing context during mosquito identification.
Usage Example
final aedesAegypti = MosquitoSpecies(
id: 'aedes_aegypti',
name: 'Aedes aegypti',
commonName: 'Yellow Fever Mosquito',
description: 'A small, dark mosquito with white markings...',
habitat: 'Urban areas, containers with standing water',
distribution: 'Tropical and subtropical regions worldwide',
imageUrl: 'assets/images/species/aedes_aegypti.jpg',
diseases: ['dengue', 'zika', 'yellow_fever', 'chikungunya'],
);
Data Sources
Species data is typically loaded from:
- Local JSON assets (
assets/database/database_data.json) - Remote CulicidaeLab server API
- Scientific literature and taxonomic databases
See also:
- Disease for disease information associated with species
- ClassificationResult for AI-powered species identification results
Constructors
-
MosquitoSpecies({required String id, required String name, required String commonName, required String description, required String habitat, required String distribution, required String imageUrl, required List<
String> diseases}) - Creates a new MosquitoSpecies instance.
-
MosquitoSpecies.fromJson(Map<
String, dynamic> json) -
Creates a MosquitoSpecies from a JSON map.
factory
Properties
- commonName → String
-
Common name(s) of the mosquito species.
final
- description → String
-
Detailed description of the mosquito species.
final
-
diseases
→ List<
String> -
List of disease IDs that this species can transmit.
final
- distribution → String
-
Geographical distribution of the species.
final
- habitat → String
-
Habitat preferences and breeding sites.
final
- hashCode → int
-
Returns the hash code for this species.
no setteroverride
- id → String
-
Unique identifier for the mosquito species.
final
- imageUrl → String
-
URL or path to the species image.
final
- name → String
-
Scientific name of the mosquito species.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this MosquitoSpecies to a JSON map.
-
toString(
) → String -
Returns a string representation of this species.
override
Operators
-
operator ==(
Object other) → bool -
Checks if two MosquitoSpecies instances are equal.
override