TrainingInfo.fromJson constructor

TrainingInfo.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TrainingInfo.fromJson(Map<String, dynamic> json) => TrainingInfo(
      type: json["type"] ?? -1,
      startTime: json["startTime"] ?? -1,
      endTime: json["endTime"] ?? -1,
      validTime: json["validTime"] ?? -1,
      steps: json["steps"] ?? -1,
      distance: json["distance"] ?? -1,
      calories: json["calories"] ?? -1,
      hrList: List<int>.from((json["hrList"] ?? []).map((x) => x)),
    );