mcy_new #1

Merged
wangyang merged 179 commits from mcy_new into master 2025-08-28 10:10:45 +08:00
1 changed files with 34 additions and 7 deletions
Showing only changes of commit 5b202fd748 - Show all commits

View File

@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:making_school_asignment_app/page/global_widget/show_student_list.dart';
import 'package:percent_indicator/percent_indicator.dart'; import 'package:percent_indicator/percent_indicator.dart';
import 'package:making_school_asignment_app/common/job/annotated_class.dart'; import 'package:making_school_asignment_app/common/job/annotated_class.dart';
import 'package:making_school_asignment_app/common/utils/enum_untils.dart'; import 'package:making_school_asignment_app/common/utils/enum_untils.dart';
@ -79,7 +81,20 @@ class _AnnotateItemState extends State<AnnotateItem> {
), ),
); );
} }
void showStudentList(context, List<AnnotatedStudents> students, [bool submitted = false]) async {
showDialog(
context: context,
builder: (BuildContext context) {
return ShowStudentList(
title: '${widget.item.className ?? ''} ${submitted ? '已提交' : '未提交'}作业学生',
studentList: students,
homeworkId: widget.homeworkId,
subject:widget.logic.state.subject,
);
},
);
EasyLoading.dismiss();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AnnotatedClass itemData = widget.item; AnnotatedClass itemData = widget.item;
@ -102,16 +117,28 @@ class _AnnotateItemState extends State<AnnotateItem> {
style: TextStyle(fontSize: widget.font, color: const Color(0xFF000000)), style: TextStyle(fontSize: widget.font, color: const Color(0xFF000000)),
), ),
const Spacer(), const Spacer(),
Text( InkWell(
'已交:${widget.item.commitStudentCount}', onTap: (){
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF4CC793)), EasyLoading.show(status: 'loading...');
showStudentList(context, widget.item.commitStudent!, true);
},
child: Text(
'已交:${widget.item.commitStudentCount}',
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF4CC793)),
),
), ),
SizedBox( SizedBox(
width: 20.r, width: 20.r,
), ),
Text( InkWell(
'未交:${widget.item.noCommitStudentCount}', onTap: (){
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFFFF5656)), EasyLoading.show(status: 'loading...');
showStudentList(context, widget.item.noCommitStudent!, true);
},
child: Text(
'未交:${widget.item.noCommitStudentCount}',
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFFFF5656)),
),
), ),
], ],
), ),