Compare commits

..

2 Commits

Author SHA1 Message Date
machuanyu 84ece07e29 Merge branch 'mcy_revision' into main 2024-03-14 16:07:34 +08:00
machuanyu 78791e84da 样式优化 2024-03-14 16:07:11 +08:00
12 changed files with 227 additions and 166 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -25,6 +25,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
late TabController tabController;
int tabIndex = 0;
List levelList = [];
bool isClicking = false;
@override
void initState() {
@ -42,7 +43,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
setState(() {
if(res.success){
levelList = res.data!;
print(levelList.length);
isClicking = false;
}else{
levelList = [];
}
@ -57,6 +58,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
BaseStructureResult res = await _client.getSetJobReadLevel(params);
if(res.code == 200){
getReadLevel();
}
}
@ -76,7 +78,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
backgroundColor: Colors.white,
title: Text(
'优先批阅人配置',
style: TextStyle(fontSize: 16.sp, color: Color(0xFF333333)),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
),
centerTitle: true,
leading: IconButton(
@ -87,8 +89,12 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
SizedBox(height: 10.r,),
Container(
padding: EdgeInsets.symmetric(horizontal: 14.r),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
),
child: TabBar(
onTap: (int val) {
print(val);
@ -126,6 +132,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
labelPadding: const EdgeInsets.all(0),
),
),
Expanded(
child:Padding(
padding: EdgeInsets.symmetric(vertical:14.r,horizontal: 14.r),
@ -157,6 +164,9 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),),
tabIndex == 0?InkWell(
onTap: (){
setState(() {
isClicking = true;
});
setJobReadLevel(item.studentGroupDetailId,0);
EasyLoading.show(status: 'loading...');
},
@ -165,7 +175,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
width: 70.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: Color(0xFF6888FD),
color: isClicking?Color(0xFFDCE3FF):Color(0xFF6888FD),
),
child: Center(
child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),),
@ -173,6 +183,9 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
),
):InkWell(
onTap: (){
setState(() {
isClicking = true;
});
setJobReadLevel(item.studentGroupDetailId,1);
EasyLoading.show(status: 'loading...');
},
@ -181,11 +194,11 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
width: 70.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: Color(0xFFFFFFFF),
border: Border.all(width: 1.r,color: Color(0xFF6888FD)),
color: isClicking?Color(0xFF6888FD):Color(0xFFFFFFFF),
border: Border.all(width: 1.r,color: isClicking?Color(0xFFFFFFFF):Color(0xFF6888FD)),
),
child: Center(
child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: Color(0xFF6888FD)),),
child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: isClicking?Color(0xFFFFFFFF):Color(0xFF6888FD)),),
),
),
)
@ -207,6 +220,9 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),),
tabIndex == 0?InkWell(
onTap: (){
setState(() {
isClicking = true;
});
setJobReadLevel(item.studentGroupDetailId,0);
EasyLoading.show(status: 'loading...');
},
@ -215,7 +231,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
width: 82.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: Color(0xFF6888FD),
color: isClicking?Color(0xFFDCE3FF):Color(0xFF6888FD),
),
child: Center(
child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),),

View File

@ -300,10 +300,11 @@ class _JobReportState extends State<JobReport> with CommonMixin {
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
backgroundColor: Colors.white,
centerTitle: true,
title: Center(
child: quickText(
widget.title + '作业报告',
size: 16.sp,
size: 14.sp,
color: Color.fromRGBO(51, 51, 51, 1),
)),
leading: IconButton(
@ -370,7 +371,7 @@ class _JobReportState extends State<JobReport> with CommonMixin {
),*/
//
Container(
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
decoration: BoxDecoration(
color: Colors.white,
@ -382,12 +383,12 @@ class _JobReportState extends State<JobReport> with CommonMixin {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('客观题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF5C5C5C),fontWeight: FontWeight.w500),),
Text('客观题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),),
SizedBox(width: 10.r,),
Text('${data.kgReport.correctRate}%',style: TextStyle(fontSize: 14.sp,color: Color(0xFF6888FD),fontWeight: FontWeight.w500),),
Text('${data.kgReport.correctRate}%',style: TextStyle(fontSize: 14.sp,color: Color(0xFF6888FD),fontWeight: FontWeight.w600),),
],
),
SizedBox(height: 10.r,),
SizedBox(height: 6.r,),
SizedBox(
height: data.kgReport.details.length>10?300.r:data.kgReport.details.length * 50.r + 20.r,
child: ReportTable(
@ -402,7 +403,7 @@ class _JobReportState extends State<JobReport> with CommonMixin {
),
//
Container(
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
decoration: BoxDecoration(
color: Colors.white,
@ -414,9 +415,9 @@ class _JobReportState extends State<JobReport> with CommonMixin {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('主观题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF5C5C5C),fontWeight: FontWeight.w500),),
SizedBox(width: 10.r,),
Text('${data.zgReport.correctRate}%',style: TextStyle(fontSize: 14.sp,color: Color(0xFF6888FD),fontWeight: FontWeight.w500),),
Text('主观题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),),
SizedBox(width: 6.r,),
Text('${data.zgReport.correctRate}%',style: TextStyle(fontSize: 14.sp,color: Color(0xFF6888FD),fontWeight: FontWeight.w600),),
],
),
SizedBox(height: 10.r,),
@ -436,13 +437,21 @@ class _JobReportState extends State<JobReport> with CommonMixin {
//
/* $TopGraphic(data),*/
//
$MasterKnowledgePoint(data.knowledgeInfos, detailKnowledgeCall),
Container(
margin: EdgeInsets.symmetric(horizontal: 10.r),
child: $MasterKnowledgePoint(data.knowledgeInfos, detailKnowledgeCall)),
//
$OverallPerformance(data.studentCount, data.overallTitles),
Container(
margin: EdgeInsets.symmetric(horizontal: 10.r),
child: $OverallPerformance(data.studentCount, data.overallTitles)),
//
$UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos),
Container(
margin: EdgeInsets.symmetric(horizontal: 10.r),
child: $UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos)),
//
$PersonnelDataOverview(data.studentAnswerInfos),
Container(
margin: EdgeInsets.symmetric(horizontal: 10.r),
child: $PersonnelDataOverview(data.studentAnswerInfos)),
],
);
}),
@ -1239,7 +1248,7 @@ Widget $masterKnowledgePoint(
List<KnowledgeInfos> knowledgeInfos,
Future<void> Function(KnowledgeInfos knowledge) detailCall) {
Widget childItem(int serialNumber, KnowledgeInfos knowItem) => Container(
margin: EdgeInsets.only(bottom: 20.h),
margin: EdgeInsets.only(bottom: 15.h,left: 15.r,right: 15.r),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@ -1257,9 +1266,8 @@ Widget $masterKnowledgePoint(
size: 12.sp,
color: Color.fromRGBO(152, 152, 152, 1)),
quickText('${doubleToStringAsFixed(knowItem.rate)}%',
size: 14.sp,
color: Color.fromRGBO(64, 64, 64, 1),
fontWeight: FontWeight.bold),
size: 12.sp,
color: Color.fromRGBO(64, 64, 64, 1)),
],
),
),
@ -1267,7 +1275,7 @@ Widget $masterKnowledgePoint(
Expanded(flex: 1, child: SizedBox()),
],
),
SizedBox(height: 6.h),
SizedBox(height: 3.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -1276,13 +1284,14 @@ Widget $masterKnowledgePoint(
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 15.h,
lineHeight: 10.h,
animationDuration: 2500,
percent: 0.1,
center: Text(
/* center:
Text(
'${doubleToStringAsFixed(knowItem.rate)}%',
style: TextStyle(color: Colors.white, fontSize: 10.sp),
),
),*/
progressColor: Theme.of(context).primaryColor,
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
barRadius: Radius.circular(10.r),
@ -1294,7 +1303,7 @@ Widget $masterKnowledgePoint(
mainAxisSize: MainAxisSize.min,
children: [
quickText('查看',
size: 14.sp, color: Color.fromRGBO(239, 135, 20, 1)),
size: 12.sp, color: Color.fromRGBO(239, 135, 20, 1)),
Icon(Icons.arrow_forward_ios,
size: 11.sp, color: Color.fromRGBO(239, 135, 20, 1)),
],
@ -1366,7 +1375,7 @@ Widget $overallPerformance(int totalNumber, List<OverallTitles> overallTitles) {
child: PieChart(
PieChartData(
borderData: FlBorderData(show: false),
sectionsSpace: 2,
sectionsSpace: 0,
centerSpaceRadius: 0,
sections: overallTitles.asMap().keys.map((index) {
var e = overallTitles[index];
@ -1378,9 +1387,8 @@ Widget $overallPerformance(int totalNumber, List<OverallTitles> overallTitles) {
(doubleToStringAsFixed(e.count / totalNumber * 100) +
'%'),
titleStyle: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.bold),
fontSize: 12.sp,
color: Color(0xFF999999)),
);
}).toList(),
),

View File

@ -175,6 +175,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
widget.jobName,
@ -215,14 +216,16 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(groupList.length, (index) {
var item = groupList[index];
return Column(
return Padding(
padding: EdgeInsets.only(bottom: 8.r),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(bottom: 5.r),
child: Text(
'${item['questionPage']}',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF2E5BFF)),
style: TextStyle(fontSize: 12.sp, color: Color(0xFF2E5BFF)),
),
),
GridView(
@ -263,8 +266,8 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
},
child: Image.asset(
'assets/images/favorite_delete_icon.png',
width: 26.r,
height: 26.r,
width: 24.r,
height: 24.r,
),
),
],
@ -274,6 +277,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
})
),
],
),
);
})
@ -379,7 +383,7 @@ Widget $classSelection(List<JobReportJoinClass>? involveClasses, JobReportJoinCl
return DropdownMenuItem(
value: e.uniqueId!,
child: quickText(e.uniqueId == '-1' ? e.graduationYear : e.graduationYear + e.className,
size: 12.sp, color: Colors.black),
size: 10.sp, color: Colors.black),
);
}).toList(),
onChanged: (String? value) {

View File

@ -62,7 +62,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
backgroundColor: Colors.white,
title: Text(
studentInfo!.studentName!,
style: TextStyle(fontSize: 16.sp, color: Color(0xFF000000)),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF000000)),
),
centerTitle: true,
leading: IconButton(
@ -91,7 +91,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
Text(
'客观题',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF5C5C5C)),
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
),
SizedBox(
width: 10.r,
@ -99,7 +99,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
Text(
'${studentInfo!.kgValidRate}%',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF6888FD)),
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
),
],
),
@ -132,7 +132,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
Text(
'主观题',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF5C5C5C)),
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
),
SizedBox(
width: 10.r,
@ -140,7 +140,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
Text(
'${studentInfo!.zgValidRate}%',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF6888FD)),
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
),
],
),

View File

@ -90,17 +90,21 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.white),
onPressed: () => Navigator.of(context).pop(),
),
Expanded(
child: Padding(
padding: EdgeInsets.only(right: 8.r),
child: Center(
child: Text(
'数据快查',
style: TextStyle(fontSize: 16.sp, color: Colors.white),
))),
style: TextStyle(fontSize: 14.sp, color: Colors.white),
)),
)),
],
),
SizedBox(height: 10.r),
@ -132,7 +136,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
),
Container(
padding: EdgeInsets.symmetric(
vertical: 10.r, horizontal: 15.r),
vertical: 15.r, horizontal: 15.r),
margin: EdgeInsets.symmetric(
vertical: 10.r, horizontal: 14.r),
decoration: BoxDecoration(
@ -142,12 +146,13 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 10.r,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 14.r,
height: 14.r,
width: 12.r,
height: 12.r,
decoration: BoxDecoration(
color: Color(0xFF4CC793),
borderRadius: BorderRadius.all(
@ -166,8 +171,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
width: 35.r,
),
Container(
width: 14.r,
height: 14.r,
width: 12.r,
height: 12.r,
decoration: BoxDecoration(
color: Color(0xFF6888FD),
borderRadius: BorderRadius.all(

View File

@ -117,7 +117,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? Color(0xFFD9D9D9)
? Colors.white
: kgInfo.state == 1
? Color(0xFFFF7474)
: Color(0xFF4CC793),
@ -152,7 +152,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? Color(0xFFD9D9D9)
? Colors.white
: kgInfo.state == 1
? Color(0xFFFF7474)
: Color(0xFF4CC793),

View File

@ -2,6 +2,8 @@ import 'package:data_table_2/data_table_2.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:marking_app/utils/toast_utils.dart';
import 'package:photo_view/photo_view.dart';
class ReportTable extends StatefulWidget {
final List headList;
@ -35,59 +37,74 @@ class _ReportTableState extends State<ReportTable> {
index: index,
color: color != null ? MaterialStateProperty.all(color) : null,
cells: [
DataCell( Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child:
Text(item.questionNo,
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
child: Text(item.questionNo,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),
DataCell( Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child:
Text('${item.validRate}%',
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
child: Text('${item.validRate}%',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),
DataCell( Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child:
Text(item.validCount,
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
child: Text(item.validCount,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
),
)),
DataCell( Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child:
Text('${item.correctRate}%',
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
child: Text('${item.correctRate}%',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),
DataCell( Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child:
Text(
widget.isKG == true?'原题':item.questionAnswer,
style:
TextStyle(fontSize: 12.sp, color: widget.isKG == true?Color(0xFFFF8A00):Color(0xFF4CC793))),
child: widget.isKG == true
? InkWell(
onTap: () {
if (item.questionPicture == null)
return ToastUtils.showInfo('当前试题没有原题');
Navigator.push(
context,
MaterialPageRoute(builder: (_) {
return Scaffold(
appBar: AppBar(),
body: PhotoView(
imageProvider: NetworkImage(
item.questionPicture!)),
);
}),
);
},
child: Text('原题',
style: TextStyle(
fontSize: 12.sp,
color: widget.isKG == true
? Color(0xFFFF8A00)
: Color(0xFF4CC793))),
)
: Text(item.questionAnswer,
style: TextStyle(
fontSize: 12.sp,
color: widget.isKG == true
? Color(0xFFFF8A00)
: Color(0xFF4CC793))),
),
)),
DataCell( Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child:
Text(item.priorityGeneral,
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
child: Text(item.priorityGeneral,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
),
)),
],
@ -101,7 +118,7 @@ class _ReportTableState extends State<ReportTable> {
scrollController: _controller,
columnSpacing: 0,
horizontalMargin: 0,
dataRowHeight:40.r,
dataRowHeight: 40.r,
bottomMargin: 0,
border: TableBorder(
horizontalInside: BorderSide(
@ -125,7 +142,9 @@ class _ReportTableState extends State<ReportTable> {
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
fixedColumnsColor: Color(0xFFE6E6E6),
fixedCornerColor: Colors.grey[400],
minWidth: widget.headList.length > 6?80.r * widget.headList.length:MediaQuery.of(context).size.width,
minWidth: widget.headList.length > 6
? 80.r * widget.headList.length
: MediaQuery.of(context).size.width,
fixedTopRows: widget.fixedRows!,
fixedLeftColumns: widget.fixedCols!,
sortColumnIndex: _sortColumnIndex,
@ -139,7 +158,12 @@ class _ReportTableState extends State<ReportTable> {
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
),
// size: ColumnSize.S,
fixedWidth: index == 0 ? 40.r:widget.headList.length > 6 ?80.r:(MediaQuery.of(context).size.width)/widget.headList.length,
fixedWidth: index == 0
? 40.r
: widget.headList.length > 6
? 80.r
: (MediaQuery.of(context).size.width - 8.r) /
widget.headList.length,
);
}),
rows: List<DataRow>.generate(widget.bodyList.length,

View File

@ -40,7 +40,7 @@ class _StudentZgTableState extends State<StudentZgTable> {
child: Column(
children: [
Center(
child: Text('批注答案',style: TextStyle(fontSize: 15.sp,color: Color(0xFF3C3C3C)),),
child: Text('批注答案',style: TextStyle(fontSize: 15.sp,color: Color(0xFF3C3C3C),fontWeight: FontWeight.w500),),
),
SizedBox(height: 10.r,),
Image.network(imgUrl,fit: BoxFit.cover, errorBuilder: (context, error, stackTrace) {

View File

@ -10,7 +10,7 @@ class TopCount extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(vertical: 10.r),
padding: EdgeInsets.symmetric(vertical: 20.r),
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
decoration: BoxDecoration(
color: Colors.white,
@ -35,6 +35,7 @@ class TopCount extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 5.r,),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
@ -55,7 +56,7 @@ class TopCount extends StatelessWidget {
],
),
SizedBox(
height: 15.r,
height: 20.r,
child: Row(
children: [
Text(
@ -101,6 +102,7 @@ class TopCount extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 5.r,),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
@ -121,7 +123,7 @@ class TopCount extends StatelessWidget {
],
),
SizedBox(
height: 15.r,
height: 20.r,
),
Text(
'正确率',
@ -145,6 +147,7 @@ class TopCount extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 5.r,),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
@ -165,7 +168,7 @@ class TopCount extends StatelessWidget {
],
),
SizedBox(
height: 10.r,
height: 20.r,
),
Text(
'全对',
@ -212,7 +215,7 @@ class TopCount extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: (MediaQuery.of(context).size.width - 55.r)/4 - 20.r,
width: (MediaQuery.of(context).size.width - 55.r)/4 ,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -230,27 +233,25 @@ class TopCount extends StatelessWidget {
child: Text(
item.title,
style: TextStyle(
color: bgColor, fontSize: 14.r),
color: bgColor, fontSize: 12.r),
)),
),
],
),
),
SizedBox(
width: 20.r,
width: 10.r,
),
Text(
item.count.toString(),
style: TextStyle(
fontSize: 24.sp,
fontWeight: FontWeight.w600,
fontSize: 20.sp,
color: Color(0xFF595959)),
),
Text(
'',
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w600,
fontSize: 14.sp,
color: Color(0xFF595959)),
),
],

View File

@ -12,7 +12,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class MyEmptyWidget extends StatelessWidget {
static const String defText = "抱歉,暂无内容";
static const String defimg = "assets/images/not_data_bgm.png";
static const String defimg = "assets/images/not_data_bgm2.png";
final String? textVal;
final String? imgAssetPath;
final AlignmentGeometry alignment;
@ -32,22 +32,25 @@ class MyEmptyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: padding,
padding: padding != null?padding:EdgeInsets.only(bottom: 40.r),
alignment: alignment,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
Opacity(
opacity: 0.6,
child: Image.asset(
imgAssetPath ?? defimg,
fit: BoxFit.cover,
width: imgWidth ?? 130.w,
height: imgHeight ?? 130.w,
width: imgWidth ?? 150.w,
height: imgHeight ?? 150.w,
),
),
Padding(
padding: EdgeInsets.only(top: 15.h),
padding: EdgeInsets.only(top: 5.h),
child: Text(
textVal ?? defText,
style: TextStyle(fontSize: 16.sp, color: Colors.grey),
style: TextStyle(fontSize: 12.sp, color: Color(0xB2898B8D)),
),
)
],