no message
This commit is contained in:
parent
4dfab0f4c3
commit
705945c270
|
|
@ -172,14 +172,14 @@ Widget $completedHomeworkView(BuildContext context,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 32.w,
|
width: isPad() ? 32.w : 36.w,
|
||||||
height: 18.h,
|
height: 18.h,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
padding: EdgeInsets.only(left: isPad() ? 2.w : 3.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(18.r),
|
topLeft: Radius.circular(14.r),
|
||||||
topRight: Radius.circular(3.r),
|
topRight: Radius.circular(3.r),
|
||||||
bottomLeft: Radius.circular(4.r),
|
bottomLeft: Radius.circular(4.r),
|
||||||
bottomRight: Radius.circular(4.r),
|
bottomRight: Radius.circular(4.r),
|
||||||
|
|
@ -202,7 +202,7 @@ Widget $completedHomeworkView(BuildContext context,
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
quickText(
|
quickText(
|
||||||
jobTaskItem.createTime.substring(0, 10),
|
jobTaskItem.createTime.substring(0, 10),
|
||||||
|
|
@ -224,6 +224,13 @@ Widget $completedHomeworkView(BuildContext context,
|
||||||
size: 12.sp,
|
size: 12.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
|
Expanded(child: SizedBox()),
|
||||||
|
FavoriteButton(
|
||||||
|
jobTaskItem.id,
|
||||||
|
jobTaskItem.title,
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
isRow: false,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -678,7 +685,8 @@ class FavoriteButton extends HookWidget with CommonMixin {
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final String jobName;
|
final String jobName;
|
||||||
EdgeInsets? margin;
|
EdgeInsets? margin;
|
||||||
FavoriteButton(this.jobId, this.jobName, {this.margin, super.key});
|
final bool isRow;
|
||||||
|
FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
||||||
|
|
||||||
Future<int> getInvolveClasses() async {
|
Future<int> getInvolveClasses() async {
|
||||||
try {
|
try {
|
||||||
|
|
@ -715,27 +723,47 @@ class FavoriteButton extends HookWidget with CommonMixin {
|
||||||
}, []);
|
}, []);
|
||||||
if (favoriteNumber.value <= 0) return Container();
|
if (favoriteNumber.value <= 0) return Container();
|
||||||
margin ??= EdgeInsets.only(top: 15.h);
|
margin ??= EdgeInsets.only(top: 15.h);
|
||||||
return Row(
|
return isRow
|
||||||
children: [
|
? Row(
|
||||||
Container(
|
children: [
|
||||||
margin: margin,
|
Container(
|
||||||
child: Material(
|
margin: margin,
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
child: Material(
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
child: InkWell(
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
onTap: () => bookmarks(context),
|
child: InkWell(
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
onTap: () => bookmarks(context),
|
||||||
child: Container(
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
alignment: Alignment.center,
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||||
child: quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
|
child: quickText('收藏夹(${favoriteNumber.value})',
|
||||||
|
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(child: SizedBox())
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Container(
|
||||||
|
margin: margin,
|
||||||
|
child: Material(
|
||||||
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => bookmarks(context),
|
||||||
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
|
child:
|
||||||
|
quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
|
||||||
Expanded(child: SizedBox())
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -647,7 +647,7 @@ class TabletEndCompleted extends StatelessWidget {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h),
|
padding: EdgeInsets.symmetric(vertical: 4.h),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('未提交:${taskItem.totalCount - taskItem.commitStudentCount}',
|
child: quickText('未提交:${taskItem.studentCount - taskItem.commitStudentCount}',
|
||||||
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -834,7 +834,7 @@ class MobileEndCompleted extends StatelessWidget {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
padding: EdgeInsets.symmetric(vertical: 5.h),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('未提交:${task.totalCount - task.commitStudentCount}',
|
child: quickText('未提交:${task.studentCount - task.commitStudentCount}',
|
||||||
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -1061,7 +1061,18 @@ Widget $itemDataViewOfPad(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => easyThrottle('OneClickReview', () => oneClickReview(task.id)),
|
onTap: () => easyThrottle('OneClickReview', () {
|
||||||
|
if (!task.canMarking) {
|
||||||
|
return AchievementView(
|
||||||
|
elevation: 0.5,
|
||||||
|
duration: Duration(seconds: 1),
|
||||||
|
title: "提示",
|
||||||
|
subTitle: "此账号无法批阅该任务",
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
).show(context);
|
||||||
|
}
|
||||||
|
oneClickReview(task.id);
|
||||||
|
}),
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
@ -1322,7 +1333,18 @@ Widget $itemDataView(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => easyThrottle('OneClickReview', () => oneClickReview(task.id)),
|
onTap: () => easyThrottle('OneClickReview', () {
|
||||||
|
if (!task.canMarking) {
|
||||||
|
return AchievementView(
|
||||||
|
elevation: 0.5,
|
||||||
|
duration: Duration(seconds: 1),
|
||||||
|
title: "提示",
|
||||||
|
subTitle: "此账号无法批阅该任务",
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
).show(context);
|
||||||
|
}
|
||||||
|
oneClickReview(task.id);
|
||||||
|
}),
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue