From 2fe7dc814e59ec18242aec629a356d697aca7742 Mon Sep 17 00:00:00 2001 From: "1147192855@qq.com" <1147192855@qq.com> Date: Tue, 25 Jun 2024 10:24:00 +0800 Subject: [PATCH 1/2] no message --- making_school_asignment_app/lib/main.dart | 5 ++++- .../lib/page/home_page/home_view.dart | 1 + .../lib/page/work_page/work_view.dart | 12 +++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/making_school_asignment_app/lib/main.dart b/making_school_asignment_app/lib/main.dart index 5adb533..968ffd2 100644 --- a/making_school_asignment_app/lib/main.dart +++ b/making_school_asignment_app/lib/main.dart @@ -20,7 +20,10 @@ void main() async { /// 初始化UserStore Get.put(UserStore().init()); - + SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, //状态栏背景颜色 + statusBarIconBrightness: Brightness.dark // dark:一般显示黑色 light:一般显示白色 + )); SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海 SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏 WidgetsFlutterBinding.ensureInitialized(); diff --git a/making_school_asignment_app/lib/page/home_page/home_view.dart b/making_school_asignment_app/lib/page/home_page/home_view.dart index 31eb696..532eb4a 100644 --- a/making_school_asignment_app/lib/page/home_page/home_view.dart +++ b/making_school_asignment_app/lib/page/home_page/home_view.dart @@ -74,6 +74,7 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin ), ), ),*/ + SizedBox(height: MediaQuery.of(context).padding.top / 2), Obx(() { return $TermRow([ EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: Routes.readOverPage), diff --git a/making_school_asignment_app/lib/page/work_page/work_view.dart b/making_school_asignment_app/lib/page/work_page/work_view.dart index 2f8b126..4d0b7b9 100644 --- a/making_school_asignment_app/lib/page/work_page/work_view.dart +++ b/making_school_asignment_app/lib/page/work_page/work_view.dart @@ -29,6 +29,7 @@ class _WorkPageState extends State with AutomaticKeepAliveClientMixin @override Widget build(BuildContext context) { + super.build(context); return AnnotatedRegion( value: const SystemUiOverlayStyle( systemNavigationBarColor: Color(0xFF000000), @@ -147,9 +148,14 @@ class _WorkPageState extends State with AutomaticKeepAliveClientMixin ], ), ), - Expanded(child: Obx(() { - return AnnotateList(tabIndex: state.tabIndex.value,assessType: 1,); - }),), + Expanded( + child: Obx(() { + return AnnotateList( + tabIndex: state.tabIndex.value, + assessType: 1, + ); + }), + ), ], ); }, From 9792eda546309c7742623cf6e536e72bf0143e05 Mon Sep 17 00:00:00 2001 From: "1147192855@qq.com" <1147192855@qq.com> Date: Tue, 25 Jun 2024 16:52:06 +0800 Subject: [PATCH 2/2] no message --- .../android/app/src/main/AndroidManifest.xml | 1 + making_school_asignment_app/lib/main.dart | 4 +- .../answer_handwriting_view.dart | 6 +- .../student_personal_view.dart | 36 +- .../widget/student_kg_table.dart | 4 +- .../widget/student_zg_table.dart | 4 +- .../lib/page/home_page/home_view.dart | 335 +++++++++--------- 7 files changed, 203 insertions(+), 187 deletions(-) diff --git a/making_school_asignment_app/android/app/src/main/AndroidManifest.xml b/making_school_asignment_app/android/app/src/main/AndroidManifest.xml index afd2ebc..8d1c9f7 100644 --- a/making_school_asignment_app/android/app/src/main/AndroidManifest.xml +++ b/making_school_asignment_app/android/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ android:icon="@mipmap/ic_launcher"> (UserStore().init()); + WidgetsFlutterBinding.ensureInitialized(); SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( statusBarColor: Colors.transparent, //状态栏背景颜色 statusBarIconBrightness: Brightness.dark // dark:一般显示黑色 light:一般显示白色 )); SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海 - SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏 - WidgetsFlutterBinding.ensureInitialized(); + await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); // 屏幕强制竖屏 runApp(const MyApp()); } diff --git a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/original_manuscript_handwriting/answer_handwriting_view.dart b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/original_manuscript_handwriting/answer_handwriting_view.dart index 4010929..d9e1a86 100644 --- a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/original_manuscript_handwriting/answer_handwriting_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/original_manuscript_handwriting/answer_handwriting_view.dart @@ -7,7 +7,6 @@ import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:functional_widget_annotation/functional_widget_annotation.dart'; import 'package:get/get.dart'; -import 'package:get/get_connect/http/src/request/request.dart'; import 'package:making_school_asignment_app/common/job/marking_models/do_test_questions_image_info.dart'; import 'package:making_school_asignment_app/common/job/marking_models/original_manuscript_handwriting_params.dart'; import 'package:making_school_asignment_app/common/mixins/event_bus_mixin.dart'; @@ -16,7 +15,6 @@ import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.d import 'package:making_school_asignment_app/common/utils/cached_network_img.dart'; import 'package:making_school_asignment_app/common/utils/my_time_util.dart'; import 'package:making_school_asignment_app/common/utils/toast_utils.dart'; -import 'package:making_school_asignment_app/common/utils/utils.dart'; import 'package:making_school_asignment_app/page/global_widget/my_text.dart'; import 'package:making_school_asignment_app/page/home_page/children/homework_review/components/job_handwriting.dart'; @@ -252,6 +250,8 @@ class PreviousNutton extends StatelessWidget { var params = handwritingLogic.params.value; if (resultData == null || params == null) return; params.pageNum = resultData.pageNum - 1; + params.templateId = null; + params.questionNo = null; handwritingLogic.params.value = OriginalManuscriptHandwritingParams.fromJson(params.toJson()); // handwritingLogic.params.value = params; }), @@ -288,6 +288,8 @@ class NextPageButton extends StatelessWidget { var params = handwritingLogic.params.value; if (resultData == null || params == null) return; params.pageNum = resultData.pageNum + 1; + params.templateId = null; + params.questionNo = null; handwritingLogic.params.value = OriginalManuscriptHandwritingParams.fromJson(params.toJson()); }), child: Icon(Icons.arrow_forward_ios, color: Colors.white, size: 22.sp), diff --git a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart index 7ba5d6e..0f4e9fc 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart @@ -25,18 +25,18 @@ class _StudentPersonalPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Color.fromRGBO(245, 245, 245, 1), + backgroundColor: const Color.fromRGBO(245, 245, 245, 1), appBar: AppBar( backgroundColor: Colors.white, title: Obx(() { return Text( state.studentInfo.value.studentName, - style: TextStyle(fontSize: 14.sp, color: Color(0xFF000000)), + style: TextStyle(fontSize: 14.sp, color: const Color(0xFF000000)), ); }), centerTitle: true, leading: IconButton( - icon: Icon(Icons.arrow_back_ios, color: Colors.black), + icon: const Icon(Icons.arrow_back_ios, color: Colors.black), onPressed: () => Get.back(), ), actions: const [ @@ -61,13 +61,13 @@ class _StudentPersonalPageState extends State { width: 93.r, height: 28.r, decoration: BoxDecoration( - color: Color(0xFFEAF3FF), + color: const Color(0xFFEAF3FF), borderRadius: BorderRadius.circular(4.r), ), child: Center( child: Text( '历史作业', - style: TextStyle(fontSize: 10.r, color: Color(0xFF2080F7)), + style: TextStyle(fontSize: 10.r, color: const Color(0xFF2080F7)), ), ), ), @@ -82,13 +82,13 @@ class _StudentPersonalPageState extends State { width: 93.r, height: 28.r, decoration: BoxDecoration( - color: Color(0xFFEDFFF7), + color: const Color(0xFFEDFFF7), borderRadius: BorderRadius.circular(4.r), ), child: Center( child: Text( '原稿笔迹', - style: TextStyle(fontSize: 10.r, color: Color(0xFF4CC793)), + style: TextStyle(fontSize: 10.r, color: const Color(0xFF4CC793)), ), ), ), @@ -112,7 +112,7 @@ class _StudentPersonalPageState extends State { children: [ Text( '客观题', - style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600), + style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600), ), SizedBox( width: 10.r, @@ -120,7 +120,7 @@ class _StudentPersonalPageState extends State { Obx(() { return Text( '${state.studentInfo.value.kgtCorrectRate}%', - style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600), + style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600), ); }), ], @@ -132,9 +132,12 @@ class _StudentPersonalPageState extends State { return SizedBox( height: state.studentInfo.value.kgtList.length > 8 ? 300.r : state.studentInfo.value.kgtList.length * 40.r + 40.r, child: StudentKgTable( - headList: ['题号', '学生答案', '标准答案'], + headList: const ['题号', '学生答案', '标准答案'], bodyList: state.studentInfo.value.kgtList, - questionNumCall: (no) { + questionNumCall: (questionNo, templateId) { + showAnswerHandwriting(context, + homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId) + .then((e) => ToastUtils.dismiss()); // showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) { // ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]); // }); @@ -164,7 +167,7 @@ class _StudentPersonalPageState extends State { children: [ Text( '主观题', - style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600), + style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600), ), SizedBox( width: 10.r, @@ -172,7 +175,7 @@ class _StudentPersonalPageState extends State { Obx(() { return Text( '${state.studentInfo.value.zgtCorrectRate}%', - style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600), + style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600), ); }), ], @@ -184,12 +187,15 @@ class _StudentPersonalPageState extends State { return SizedBox( height: state.studentInfo.value.zgtList.length > 8 ? 300.r : state.studentInfo.value.zgtList.length * 40.r + 40.r, child: StudentZgTable( - headList: ['题号', '用时', '批注结果', '答案'], + headList: const ['题号', '用时', '批注结果', '答案'], bodyList: state.studentInfo.value.zgtList, - questionNumCall: (no) { + questionNumCall: (questionNo, templateId) { /* showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) { ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]); });*/ + showAnswerHandwriting(context, + homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId) + .then((e) => ToastUtils.dismiss()); }, ), ); diff --git a/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_kg_table.dart b/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_kg_table.dart index dfc3527..e95ae4f 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_kg_table.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_kg_table.dart @@ -9,7 +9,7 @@ class StudentKgTable extends StatefulWidget { final List bodyList; final int? fixedRows; final int? fixedCols; - final Function(String)? questionNumCall; + final Function(int, int)? questionNumCall; const StudentKgTable({ Key? key, @@ -44,7 +44,7 @@ class _StudentKgTableState extends State { InkWell( onTap: () { if (widget.questionNumCall != null) { - widget.questionNumCall!(item.questionNo.toString()); + widget.questionNumCall!(item.questionNo, item.templateId); } }, child: Center( diff --git a/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_zg_table.dart b/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_zg_table.dart index 940e1fa..3c34ab5 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_zg_table.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_personal/widget/student_zg_table.dart @@ -11,7 +11,7 @@ class StudentZgTable extends StatefulWidget { final List bodyList; final int? fixedRows; final int? fixedCols; - final Function(String)? questionNumCall; + final Function(int, int)? questionNumCall; const StudentZgTable({ Key? key, @@ -41,7 +41,7 @@ class _StudentZgTableState extends State { DataCell(InkWell( onTap: () { if (widget.questionNumCall != null) { - widget.questionNumCall!(item.questionNo.toString()); + widget.questionNumCall!(item.questionNo, item.templateId); } }, child: Center( diff --git a/making_school_asignment_app/lib/page/home_page/home_view.dart b/making_school_asignment_app/lib/page/home_page/home_view.dart index 532eb4a..bd0be96 100644 --- a/making_school_asignment_app/lib/page/home_page/home_view.dart +++ b/making_school_asignment_app/lib/page/home_page/home_view.dart @@ -45,26 +45,31 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin statusBarIconBrightness: Brightness.dark, statusBarBrightness: Brightness.light, ), - child: EasyRefresh( - firstRefresh: false, - taskIndependence: true, - controller: logic.refreshController, - header: MaterialHeader(), - footer: TaurusFooter(), - onRefresh: () async { - state.pageNumber = 1; - return logic.getList(); - }, - onLoad: () async { - if (state.workList.length < state.totalCount.value) { - state.pageNumber++; - return logic.getList(); - } - }, - child: Column( - children: [ - SizedBox(height: 15.r,), - /* Container( + child: OrientationBuilder( + builder: (BuildContext context, Orientation orientation) { + print('1111111111111'); + return EasyRefresh( + firstRefresh: false, + taskIndependence: true, + controller: logic.refreshController, + header: MaterialHeader(), + footer: TaurusFooter(), + onRefresh: () async { + state.pageNumber = 1; + return logic.getList(); + }, + onLoad: () async { + if (state.workList.length < state.totalCount.value) { + state.pageNumber++; + return logic.getList(); + } + }, + child: Column( + children: [ + SizedBox( + height: 15.r, + ), + /* Container( height: 200.h, width: double.infinity, decoration: const BoxDecoration( @@ -74,31 +79,31 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin ), ), ),*/ - SizedBox(height: MediaQuery.of(context).padding.top / 2), - Obx(() { - return $TermRow([ - EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: Routes.readOverPage), - EntranceModel( - title: '学生历史作业', - image: 'assets/images/job_home_history.png', - navigationUrl: Routes.studentHistoryWorkPage, - page: 'history', - ), - EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: Routes.knowledgePointsGraspPage) - ], state.totalCount.value); - }), - spaceWidth, - $TermRow([ - EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: Routes.answerTrajectoryPage), - EntranceModel( - title: '优先批阅设定', - image: 'assets/images/job_home_youxian.png', - navigationUrl: Routes.studentHistoryWorkPage, - page: 'set', - ) - ], 0), + SizedBox(height: MediaQuery.of(context).padding.top / 2), + Obx(() { + return $TermRow([ + EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: Routes.readOverPage), + EntranceModel( + title: '学生历史作业', + image: 'assets/images/job_home_history.png', + navigationUrl: Routes.studentHistoryWorkPage, + page: 'history', + ), + EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: Routes.knowledgePointsGraspPage) + ], state.totalCount.value); + }), + spaceWidth, + $TermRow([ + EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: Routes.answerTrajectoryPage), + EntranceModel( + title: '优先批阅设定', + image: 'assets/images/job_home_youxian.png', + navigationUrl: Routes.studentHistoryWorkPage, + page: 'set', + ) + ], 0), - /* $TermRow( + /* $TermRow( context, [ EntranceModel( @@ -107,142 +112,144 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin navigationUrl: '') ], 0),*/ - SizedBox(height: 15.h), - Obx(() { - return Container( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Column( - children: List.generate(state.workList.length, (index) { - Items item = state.workList[index]; - return InkWell( - onTap: () { - Get.toNamed(Routes.annotateClassPage, arguments: { - 'id': item.id, - 'name': item.name, - 'grade': item.grade, - 'subject': item.subject, - }); - }, - child: Container( - margin: EdgeInsets.only(bottom: 15.h), - child: Column( - children: [ - SizedBox(height: 4.h), - Container( - padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 10.w), - width: double.infinity, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.r), - color: const Color.fromRGBO(255, 255, 255, 1), - boxShadow: const [ - BoxShadow( - color: Color.fromRGBO(210, 216, 241, 1), - offset: Offset.zero, //阴影y轴偏移量 - blurRadius: 5.8, //阴影模糊程度 - spreadRadius: 0, //阴影扩散程度 - ) - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: Utils.isPad() ? 32.w : 38.w, - height: 18.h, - alignment: Alignment.center, - padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), - decoration: BoxDecoration( - color: state.type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(14.r), - topRight: Radius.circular(3.r), - bottomLeft: Radius.circular(4.r), - bottomRight: Radius.circular(4.r), - ), - ), - margin: EdgeInsets.only(right: 4.w), - child: quickText(state.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), - ), - Expanded( - child: quickText( - item.name, - maxLines: 2, - size: Utils.isPad() ? 14.sp : 16.sp, - color: const Color.fromRGBO(70, 70, 70, 1), - fontWeight: FontWeight.bold, - ), + SizedBox(height: 15.h), + Obx(() { + return Container( + padding: EdgeInsets.symmetric(horizontal: 12.w), + child: Column( + children: List.generate(state.workList.length, (index) { + Items item = state.workList[index]; + return InkWell( + onTap: () { + Get.toNamed(Routes.annotateClassPage, arguments: { + 'id': item.id, + 'name': item.name, + 'grade': item.grade, + 'subject': item.subject, + }); + }, + child: Container( + margin: EdgeInsets.only(bottom: 15.h), + child: Column( + children: [ + SizedBox(height: 4.h), + Container( + padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 10.w), + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.r), + color: const Color.fromRGBO(255, 255, 255, 1), + boxShadow: const [ + BoxShadow( + color: Color.fromRGBO(210, 216, 241, 1), + offset: Offset.zero, //阴影y轴偏移量 + blurRadius: 5.8, //阴影模糊程度 + spreadRadius: 0, //阴影扩散程度 ) ], ), - SizedBox(height: 10.h), - Row( - crossAxisAlignment: CrossAxisAlignment.end, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - quickText( - EnumUtils.formatSubject(item.subject), - color: const Color.fromRGBO(97, 97, 97, 1), - size: 12.sp, + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: Utils.isPad() ? 32.w : 38.w, + height: 18.h, + alignment: Alignment.center, + padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), + decoration: BoxDecoration( + color: state.type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(14.r), + topRight: Radius.circular(3.r), + bottomLeft: Radius.circular(4.r), + bottomRight: Radius.circular(4.r), + ), + ), + margin: EdgeInsets.only(right: 4.w), + child: quickText(state.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), + ), + Expanded( + child: quickText( + item.name, + maxLines: 2, + size: Utils.isPad() ? 14.sp : 16.sp, + color: const Color.fromRGBO(70, 70, 70, 1), + fontWeight: FontWeight.bold, + ), + ) + ], ), - quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), + SizedBox(height: 10.h), Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ - quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp), quickText( - '${item.questionCount! - item.annotateCount!}', + EnumUtils.formatSubject(item.subject), color: const Color.fromRGBO(97, 97, 97, 1), - size: 13.sp, + size: 12.sp, ), + quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), + Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp), + quickText( + '${item.questionCount! - item.annotateCount!}', + color: const Color.fromRGBO(97, 97, 97, 1), + size: 13.sp, + ), + ], + ), + quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), + quickText(DateTime.parse(item.publishTime).toString().substring(0, 10), + color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp), ], ), - quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), - quickText(DateTime.parse(item.publishTime).toString().substring(0, 10), - color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp), + SizedBox(height: 10.h), + Row( + children: [ + Expanded( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.r), + ), + child: LinearPercentIndicator( + padding: EdgeInsets.zero, + animation: true, + lineHeight: 8.h, + animationDuration: 2500, + percent: item.annotateRate == null ? 0 : item.annotateRate! / 100, + progressColor: const Color(0xFF6888FD), + backgroundColor: const Color(0xFFE8E8E8), + barRadius: Radius.circular(10.r), + ), + ), + ), + SizedBox( + width: 10.r, + ), + quickText('${item.annotateRate!.toStringAsFixed(0)}%', size: 10.sp, color: const Color(0xFF464646)), + ], + ), + // FavoriteButton(jobTaskItem.id, jobTaskItem.title), ], ), - SizedBox(height: 10.h), - Row( - children: [ - Expanded( - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.r), - ), - child: LinearPercentIndicator( - padding: EdgeInsets.zero, - animation: true, - lineHeight: 8.h, - animationDuration: 2500, - percent: item.annotateRate == null ? 0 : item.annotateRate! / 100, - progressColor: const Color(0xFF6888FD), - backgroundColor: const Color(0xFFE8E8E8), - barRadius: Radius.circular(10.r), - ), - ), - ), - SizedBox( - width: 10.r, - ), - quickText('${item.annotateRate!.toStringAsFixed(0)}%', size: 10.sp, color: const Color(0xFF464646)), - ], - ), - // FavoriteButton(jobTaskItem.id, jobTaskItem.title), - ], - ), + ), + ], ), - ], - ), - ), - ); - }), - ), - ); - }), - ], - ), + ), + ); + }), + ), + ); + }), + ], + ), + ); + }, ), )); }