develop #1

Merged
akhdanre merged 104 commits from develop into main 2025-07-10 12:38:53 +07:00
1 changed files with 6 additions and 2 deletions
Showing only changes of commit 01e92c14ab - Show all commits

View File

@ -12,7 +12,7 @@ class QuizCreationController extends GetxController {
RxBool isGenerate = true.obs;
Rx<QuestionType> currentQuestionType = QuestionType.fillTheBlank.obs;
RxList<QuestionData> quizData = <QuestionData>[QuestionData(index: 1)].obs;
RxList<QuestionData> quizData = <QuestionData>[QuestionData(index: 1, type: QuestionType.fillTheBlank)].obs;
RxInt selectedQuizIndex = 0.obs;
@override
@ -53,7 +53,11 @@ class QuizCreationController extends GetxController {
// Listener perubahan tipe soal
ever<QuestionType>(currentQuestionType, (type) {
if (quizData.isNotEmpty) {
_updateCurrentQuestion(type: type);
if (type == QuestionType.option) {
_updateCurrentQuestion(type: type, correctAnswerIndex: 0);
} else {
_updateCurrentQuestion(type: type, correctAnswerIndex: null);
}
}
});