fromJsonString static method

WebPredictionResult fromJsonString(
  1. 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));