SafetyInsights.fromJson constructor
Implementation
SafetyInsights.fromJson(Map<String, dynamic> jsonDecode) {
riskScore = jsonDecode['riskScore']?.toDouble();
interventionCount = jsonDecode['interventionCount'];
criticalEvents = (jsonDecode['criticalEvents'] as List?)
?.map((e) => e?.toString())
.toList();
safetyTips = (jsonDecode['safetyTips'] as List?)
?.map((e) => e?.toString())
.toList();
}