fromJsonString static method
- String str
Creates a WebPredictionResult from a JSON string.
Convenience method for parsing JSON strings directly from API responses.
Example:
final jsonString = '{"id": "pred_123", "scientific_name": "Aedes aegypti", ...}';
final result = WebPredictionResult.fromJsonString(jsonString);
Implementation
static WebPredictionResult fromJsonString(String str) =>
WebPredictionResult.fromJson(json.decode(str));