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_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.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:making_school_asignment_app/common/job/annotated_class.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
Widget build(BuildContext context) {
AnnotatedClass itemData = widget.item;
@ -102,16 +117,28 @@ class _AnnotateItemState extends State<AnnotateItem> {
style: TextStyle(fontSize: widget.font, color: const Color(0xFF000000)),
),
const Spacer(),
Text(
'已交:${widget.item.commitStudentCount}',
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF4CC793)),
InkWell(
onTap: (){
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(
width: 20.r,
),
Text(
'未交:${widget.item.noCommitStudentCount}',
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFFFF5656)),
InkWell(
onTap: (){
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)),
),
),
],
),