diff --git a/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart b/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart index 5cee9ee..08d7530 100644 --- a/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart +++ b/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart @@ -409,16 +409,33 @@ class _JobListParticipateInClassState extends State w ), backgroundColor: Colors.white, ), - body: MyFutureBuilder.buildFutureBuilderOfSingleInstance?>(context, _future, (value) { - if (value == null) return Container(); - value.forEach((e) { - e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0; - }); - bool thePadTerminal = isPad(); - if (widget.completed) { - // 已完成 - if (thePadTerminal) - return TabletEndCompleted( + body: RefreshIndicator( + onRefresh: () async { + getListOfJobFavoritesData().then((value) { + _future = getData(); + toUpState(setState, () {}, mounted); + }); + }, + child: MyFutureBuilder.buildFutureBuilderOfSingleInstance?>(context, _future, (value) { + if (value == null) return Container(); + value.forEach((e) { + e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0; + }); + bool thePadTerminal = isPad(); + if (widget.completed) { + // 已完成 + if (thePadTerminal) + return TabletEndCompleted( + data: value, + genderName: widget.genderName, + bookmarks: bookmarks, + jobViewReport: jobViewReport, + quickDataCheck: quickDataCheck, + showStudentList: showStudentList, + ); + + // 已完成手机端 + return MobileEndCompleted( data: value, genderName: widget.genderName, bookmarks: bookmarks, @@ -426,21 +443,23 @@ class _JobListParticipateInClassState extends State w quickDataCheck: quickDataCheck, showStudentList: showStudentList, ); + } - // 已完成手机端 - return MobileEndCompleted( - data: value, - genderName: widget.genderName, - bookmarks: bookmarks, - jobViewReport: jobViewReport, - quickDataCheck: quickDataCheck, - showStudentList: showStudentList, - ); - } + // 未完成页面 + if (thePadTerminal) + return TabletEnd( + data: value, + genderName: widget.genderName, + bookmarks: bookmarks, + endReview: endReview, + goToReview: goToReview, + jobViewReport: jobViewReport, + quickDataCheck: quickDataCheck, + oneClickReview: oneClickReview, + showStudentList: showStudentList, + ); - // 未完成页面 - if (thePadTerminal) - return TabletEnd( + return MobileEnd( data: value, genderName: widget.genderName, bookmarks: bookmarks, @@ -451,19 +470,8 @@ class _JobListParticipateInClassState extends State w oneClickReview: oneClickReview, showStudentList: showStudentList, ); - - return MobileEnd( - data: value, - genderName: widget.genderName, - bookmarks: bookmarks, - endReview: endReview, - goToReview: goToReview, - jobViewReport: jobViewReport, - quickDataCheck: quickDataCheck, - oneClickReview: oneClickReview, - showStudentList: showStudentList, - ); - }), + }), + ), ), ); }