mcy_new #1
|
|
@ -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,17 +117,29 @@ 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(
|
||||||
|
onTap: (){
|
||||||
|
EasyLoading.show(status: 'loading...');
|
||||||
|
showStudentList(context, widget.item.commitStudent!, true);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
'已交:${widget.item.commitStudentCount}',
|
'已交:${widget.item.commitStudentCount}',
|
||||||
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF4CC793)),
|
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF4CC793)),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 20.r,
|
width: 20.r,
|
||||||
),
|
),
|
||||||
Text(
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
EasyLoading.show(status: 'loading...');
|
||||||
|
showStudentList(context, widget.item.noCommitStudent!, true);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
'未交:${widget.item.noCommitStudentCount}',
|
'未交:${widget.item.noCommitStudentCount}',
|
||||||
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFFFF5656)),
|
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFFFF5656)),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue