ProgramContents.fromJson constructor

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

Implementation

ProgramContents.fromJson(Map<String, dynamic> json) {
  if (json["id"] is String) id = json["id"];
  if (json["subcardOrderNumber"] is int) {
    subcardOrderNumber = json["subcardOrderNumber"];
  }
  if (json["subcardPictureUrl"] is String) {
    subcardPictureUrl = json["subcardPictureUrl"];
  }
  if (json["exerciceDuration"] is int) {
    exerciceDuration = json["exerciceDuration"];
  }
  breakAfter = json["breakAfter"];
  if (json["numberOfRepetitions"] is int) {
    numberOfRepetitions = json["numberOfRepetitions"];
  }
  values = json["values"];
  if (json["breakBetweenRep"] is int) {
    breakBetweenRep = json["breakBetweenRep"];
  }
  numberOfSeries = json["numberOfSeries"];
  materialPictureUrl = json["materialPictureUrl"];
  exLottieUrl = json["exLottieUrl"];
  exGifUrl = json["exGifUrl"];
  exVideoUrl = json["exVideoUrl"];
  if (json["isBreak"] is int) isBreak = json["isBreak"];
  if (json["subcardTitle"] is String) {
    subcardTitle = json["subcardTitle"];
  }
  if (json["description"] is String) description = json["description"];
  if (json["subcardVideoUrl"] is String) {
    subcardVideoUrl = json["subcardVideoUrl"];
  }
  materialDescription = json["materialDescription"];
  startedTime = json["startedTime"];
  pausedTime = json["pausedTime"];
  pausedDuration = json["pausedDuration"] ?? 0;
  isCompleted = json["isCompleted"] ?? false;
}