TrainBean.fromJson constructor

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

Implementation

factory TrainBean.fromJson(Map<String, dynamic> json) => TrainBean(
      historyTrainList: List<HistoryTrainList>.from((json["historyTrainList"] ?? []).map((x) => HistoryTrainList.fromJson(x))),
      trainingList: List<TrainingInfo>.from((json["trainingList"] ?? []).map((x) => TrainingInfo.fromJson(x))),
      type: json["type"],
    );