Compare commits
No commits in common. "4a03e92468aa0de184c3faa3d4da20d90c25a7ed" and "7c5ef98014bf8c0eef2e207f0f2dd60c4debc47d" have entirely different histories.
4a03e92468
...
7c5ef98014
|
|
@ -61,9 +61,7 @@ Widget $questionNumberScrollView({
|
||||||
usePiddingTop.value = sateZoomData.zoomFile.value?.imageHeightOffsetStart ?? 0;
|
usePiddingTop.value = sateZoomData.zoomFile.value?.imageHeightOffsetStart ?? 0;
|
||||||
});
|
});
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
var studentQuestionsStream = sateData.studentQuestions.listen((e) {
|
var studentQuestionsStream = sateData.studentQuestions.listen((e) => studentQuestions.value = e ?? []);
|
||||||
studentQuestions.value = e ?? [];
|
|
||||||
});
|
|
||||||
|
|
||||||
var stream = sateZoomData.initScale.listen((e) {
|
var stream = sateZoomData.initScale.listen((e) {
|
||||||
// print("initScale : $e");
|
// print("initScale : $e");
|
||||||
|
|
@ -157,9 +155,9 @@ Widget $scoringQuestionsView(BuildContext context, HomeworkReviewState sateData,
|
||||||
/// 学生打分数据
|
/// 学生打分数据
|
||||||
studentScoreListener() {
|
studentScoreListener() {
|
||||||
item.studentScore = studentScore.value;
|
item.studentScore = studentScore.value;
|
||||||
var theVal = sateData.studentQuestions.value?.firstWhereOrNull((e) => e.questionNo == e.questionNo);
|
var theVal = sateData.studentQuestions.value?.firstWhereOrNull((e)=>e.questionNo==e.questionNo);
|
||||||
if (theVal != null) theVal.studentScore = studentScore.value;
|
if(theVal!=null) theVal.studentScore = studentScore.value;
|
||||||
|
|
||||||
var studentQuestions = sateData.studentQuestions.value;
|
var studentQuestions = sateData.studentQuestions.value;
|
||||||
if (item.studentScore == null) return;
|
if (item.studentScore == null) return;
|
||||||
|
|
||||||
|
|
@ -173,15 +171,7 @@ Widget $scoringQuestionsView(BuildContext context, HomeworkReviewState sateData,
|
||||||
|
|
||||||
studentScore.addListener(studentScoreListener);
|
studentScore.addListener(studentScoreListener);
|
||||||
|
|
||||||
var studentQuestionsStream = sateData.studentQuestions.listen((e) {
|
|
||||||
var itemVal = (e ?? []).firstWhereOrNull((e1) => e1.questionNo == item.questionNo);
|
|
||||||
if (itemVal != null && studentScore.value != itemVal.studentScore) {
|
|
||||||
studentScore.value = itemVal.studentScore;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return () {
|
return () {
|
||||||
studentQuestionsStream.cancel();
|
|
||||||
studentScore.removeListener(studentScoreListener);
|
studentScore.removeListener(studentScoreListener);
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue