WidgetData.fromJson constructor

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

Implementation

WidgetData.fromJson(Map<String, dynamic> json) {
  pg = json["pg"];
  method = json["method"];
  if (json["select_terms"] != null) {
    selectTerms = [];
    json["select_terms"].forEach((v) {
      selectTerms?.add(WidgetTerm.fromJson(v));
    });
  }
  termPassed = json["term_passed"];
  completed = json["completed"];
  extra = json["extra"] != null ? WidgetExtra.fromJson(json["extra"]) : null;
}