QuizStepModel.fromJson constructor

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

Implementation

QuizStepModel.fromJson(Map<String, dynamic> json) {
  try {
    stepKey = json['stepKey'];
    stepLabel = json['stepLabel'];
    stepDescription = json["stepDescription"];
    showStepLabel = json['showStepLabel'] ?? true;
    allQuestions = [...json['questions'].map((e) => QuizQuestionModel.fromJson(e))];
  } catch (e, s) {
    debugPrint('❌ Error on QuizStepModel.fromJson: $e, $s');
  }
}