修复BUG和使用更新APP插件
This commit is contained in:
parent
f638ef23de
commit
c6409b095c
|
|
@ -35,6 +35,7 @@ android {
|
|||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
|
|
@ -84,8 +85,14 @@ android {
|
|||
shrinkResources false //删除无用资源
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' // 核心库反糖依赖
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
android:name="flutterEmbedding"
|
||||
android:value="2"/>
|
||||
<!-- Provider -->
|
||||
<provider
|
||||
<!-- <provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileProvider"
|
||||
android:exported="false"
|
||||
|
|
@ -48,6 +48,16 @@
|
|||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths"/>
|
||||
</provider> -->
|
||||
<!-- ✅ FileProvider 配置 - 这是必需的! -->
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
<!-- 访问电话状态 -->
|
||||
|
|
|
|||
|
|
@ -1,5 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 外部存储 -->
|
||||
<external-path name="external_files" path="." />
|
||||
<!-- 应用内部存储 -->
|
||||
<files-path name="files" path="." />
|
||||
<!-- 缓存目录 -->
|
||||
<cache-path name="cache" path="." />
|
||||
<!-- 外部缓存 -->
|
||||
<external-cache-path name="external_cache" path="." />
|
||||
<!-- 下载目录 -->
|
||||
<external-path name="downloads" path="Download/" />
|
||||
|
||||
<!-- 如果你已有其他配置,请保留它们 -->
|
||||
<external-path path="Android/data/com.yuanxuan.making_school_asignment_app/" name="files_root" />
|
||||
<external-path path="." name="external_storage_root" />
|
||||
</paths>
|
||||
|
|
@ -177,6 +177,23 @@ class PageIndexController extends GetxController with RequestToolMixin {
|
|||
_pageIndexState = PageIndexState(pageController: PageController());
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
/// TODO 升级插件 暂时不使用
|
||||
// @override
|
||||
// void onReady() {
|
||||
// AppUpgradeSimple.instance.checkUpdate(
|
||||
// context: Get.context!,
|
||||
// url: 'https://dpc-teacher-api.23544.com/api/infra/AppVersion/Get',
|
||||
// params: {
|
||||
// 'appName': 'making_school_asignment_app',
|
||||
// 'ftuType': 1,
|
||||
// },
|
||||
// showNoUpdateToast: true,
|
||||
// autoDownload: false,
|
||||
// autoInstall: true,
|
||||
// );
|
||||
// super.onReady();
|
||||
// }
|
||||
}
|
||||
|
||||
class StartPageIndexBinding extends Bindings {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import 'package:making_school_asignment_app/routes/app_pages.dart';
|
|||
import 'class_student_logic.dart';
|
||||
|
||||
class ClassStudentPage extends StatefulWidget {
|
||||
const ClassStudentPage({Key? key}) : super(key: key);
|
||||
const ClassStudentPage({super.key});
|
||||
|
||||
@override
|
||||
State<ClassStudentPage> createState() => _ClassStudentPageState();
|
||||
|
|
@ -24,409 +24,320 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.title.value,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||
);
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
child: state.studentList.isNotEmpty
|
||||
? Utils.isPad()
|
||||
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.title.value,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||
);
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
child: state.studentList.isNotEmpty
|
||||
? Utils.isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 0.r,
|
||||
crossAxisSpacing: 0.r,
|
||||
childAspectRatio: 556 / 90,
|
||||
),
|
||||
children:
|
||||
List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id,
|
||||
'subject':state.subject,
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(0.r)),
|
||||
color: Colors.transparent,
|
||||
border: Border(left: BorderSide(width:
|
||||
(index + 1)%2 == 0? 1.r:0,color: const Color(0xFFA5A5A5)),bottom: BorderSide(width: 1.r,color: const Color(0xFFA5A5A5)))
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 0.r,
|
||||
crossAxisSpacing: 0.r,
|
||||
childAspectRatio: 556 / 90,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Theme.of(context).primaryColor),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFB2DA93)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFB2DA93))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
Theme.of(context).primaryColor,
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFEBE4FF),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Theme.of(context).primaryColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
children: List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id,
|
||||
'subject':state.subject,
|
||||
'subject': state.subject,
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.r, horizontal: 15.r),
|
||||
margin: EdgeInsets.only(bottom: 15.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(0.r)),
|
||||
color: Colors.transparent,
|
||||
border: Border(
|
||||
left: BorderSide(
|
||||
width: (index + 1) % 2 == 0 ? 1.r : 0, color: const Color(0xFFA5A5A5)),
|
||||
bottom: BorderSide(width: 1.r, color: const Color(0xFFA5A5A5)))),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: const Color(0xFF4CC793)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Theme.of(context).primaryColor),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFB2DA93)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFB2DA93))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r, color: const Color(0xFFB2DA93)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(fontSize: 10.r, color: const Color(0xFFB2DA93))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(fontSize: 10.r, color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, false);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFEBE4FF),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 2.r, left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Theme.of(context).primaryColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, true);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 2.r, left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: const Color(0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: state.studentList.length,
|
||||
itemBuilder: (context, index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id,
|
||||
'subject': state.subject,
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 15.r),
|
||||
margin: EdgeInsets.only(bottom: 15.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF4CC793),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: Color(0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
item.name,
|
||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFF4CC793)),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r, color: const Color(0xFFB2DA93)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(fontSize: 10.r, color: const Color(0xFFB2DA93))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(fontSize: 10.r, color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, false);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5.r, left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, true);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5.r, left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: const Color(0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: state.studentList.length,
|
||||
),
|
||||
)
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}
|
||||
);
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ class PersonalDetailTopBar extends StatefulWidget {
|
|||
final ValueChanged<int>? onTap;
|
||||
final String customTimeStr;
|
||||
final bool? hasAll;
|
||||
const PersonalDetailTopBar({Key? key,required this.controller, this.onTap, required this.customTimeStr,this.hasAll=false}) : super(key: key);
|
||||
const PersonalDetailTopBar(
|
||||
{super.key, required this.controller, this.onTap, required this.customTimeStr, this.hasAll = false});
|
||||
|
||||
@override
|
||||
State<PersonalDetailTopBar> createState() => _PersonalDetailTopBarState();
|
||||
|
|
@ -14,7 +15,7 @@ class PersonalDetailTopBar extends StatefulWidget {
|
|||
|
||||
class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
||||
@override
|
||||
void initState(){
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
|
@ -22,9 +23,7 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
|||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
||||
),
|
||||
decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 1.r, color: const Color(0xFFCCCCCC)))),
|
||||
child: TabBar(
|
||||
controller: widget.controller,
|
||||
dividerHeight: 0,
|
||||
|
|
@ -33,26 +32,22 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
|||
labelStyle: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: const Color(0xFF4CC793),
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
isScrollable: true,
|
||||
labelColor: const Color(0xFF4CC793),
|
||||
labelColor: Theme.of(context).primaryColor,
|
||||
unselectedLabelColor: const Color(0xFF505E6E),
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||
onTap: widget.onTap,
|
||||
indicator: UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
width: 2.r,
|
||||
color:const Color(0xFF4CC793)
|
||||
),
|
||||
borderSide: BorderSide(width: 2.r, color: Theme.of(context).primaryColor),
|
||||
),
|
||||
tabs: <Widget>[
|
||||
const Tab(text: '近一周'),
|
||||
const Tab(text: '近一月'),
|
||||
Tab(text: widget.customTimeStr),
|
||||
if(widget.hasAll == true)
|
||||
const Tab(text: '全部'),
|
||||
if (widget.hasAll == true) const Tab(text: '全部'),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,11 @@ dependencies:
|
|||
url: https://gitea.23544.com/wangyang/zoom_widget.git
|
||||
# url: https://github.com/semakers/zoom-widget.git
|
||||
# ref: a35c9da6afe405c23b5897b449683d424016e9f1
|
||||
# TODO 升级插件 暂时不使用
|
||||
# app_upgrade_plugin:
|
||||
# # path: C:\Users\wy\Desktop\my_project\app_upgrade_plugin
|
||||
# git:
|
||||
# url: https://gitea.23544.com/wangyang/app_upgrade_plugin.git
|
||||
# start retrofit请求封装
|
||||
retrofit: ^4.1.0
|
||||
json_annotation: 4.9.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue