PerformanceInsights.fromJson constructor

PerformanceInsights.fromJson(
  1. Map<String, dynamic> jsonDecode
)

Implementation

PerformanceInsights.fromJson(Map<String, dynamic> jsonDecode) {
  drivingScore = jsonDecode['drivingScore']?.toDouble();
  smoothnessRating = jsonDecode['smoothnessRating']?.toDouble();
  speedCompliance = jsonDecode['speedCompliance']?.toDouble();

  improvementAreas = (jsonDecode['improvementAreas'] as List?)
      ?.map((e) => e?.toString())
      .toList();
}