mcy_new #1

Merged
wangyang merged 179 commits from mcy_new into master 2025-08-28 10:10:45 +08:00
33 changed files with 595 additions and 351 deletions
Showing only changes of commit 07d0b999bc - Show all commits

View File

@ -2,7 +2,8 @@
<application
android:label="点智学"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true">
<activity
android:name=".MainActivity"
android:exported="true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#eeeeee</item>
<item name="android:windowSplashScreenBackground">#FFFFFF</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#eeeeee</item>
<item name="android:windowSplashScreenBackground">#FFFFFF</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -3,5 +3,39 @@
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- 访问电话状态 -->
<uses-permission
android:name="android.permission.READ_PHONE_STATE"/>
<!-- 允许全部网络访问 -->
<uses-permission
android:name="android.permission.INTERNET"/>
<!-- 获取网络信息状态 -->
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- 获取当前WiFi接入的状态以及WLAN热点的信息 -->
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"/>
<!-- 获取当前设备存储权限 -->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.ACTION_MANAGE_UNKNOWN_APP_SOURCES"/>
<!-- 这个权限用于app安装 -->
<uses-permission
android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<!-- 屏幕常亮权限 -->
<uses-permission
android:name="android.permission.WAKE_LOCK"/>
<uses-permission
android:name="android.permission.CAMERA"/>
<!-- Permissions options for the `access notification policy` group -->
<uses-permission
android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
<!-- Permissions options for the `notification` group -->
<uses-permission
android:name="android.permission.POST_NOTIFICATIONS"/>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -5,11 +5,11 @@ flutter_native_splash:
# 如需恢复默认的白屏,执行如下命令
# flutter pub run flutter_native_splash:remove
# 设置闪屏页的默认态logo或背景图片路径
color: "#eeeeee"
color: "##FFFFFF"
image_ios: assets/images/splash_native.png
background_image_android: assets/images/splash_native.png
android_12:
image: assets/images/splash.png
image: assets/images/splash2.png
android: true
ios: true
android_gravity: fill

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

View File

@ -1,9 +1,12 @@
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/app_version.dart';
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:making_school_asignment_app/common/utils/permission_describe_util.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:permission_handler/permission_handler.dart';
import 'UpdateDialog.dart';
import 'model/UpdateAppEvent.dart';
@ -20,7 +23,21 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
// }
void getAppUpgrade(BuildContext context) async {
// if (!const bool.fromEnvironment('dart.vm.product')) return;
if (!const bool.fromEnvironment('dart.vm.product')) return;
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
Permission storagePermission;
if (androidInfo.version.sdkInt >= 33) {
storagePermission = Permission.manageExternalStorage;
} else {
storagePermission = Permission.storage;
}
PermissionDescribeUtil.instance.toLaunchPermissionRequest(
context,
title: '储存权限请求',
describe: "为了提供更好的服务需要获取到存储权限用于保存APP升级文件APK进行升级",
permissions: [storagePermission],
);
try {
showUpgrade.value = true;
// if (['18888888888'].contains(user.loginName)) return;

View File

@ -0,0 +1,295 @@
import 'dart:async';
import 'package:app_settings/app_settings.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
import 'package:permission_handler/permission_handler.dart';
class PermissionDescribePage extends StatefulWidget {
final String title;
final String describe;
final List<Permission> permissions;
const PermissionDescribePage({required this.title, required this.describe, required this.permissions, super.key});
@override
State<PermissionDescribePage> createState() => _PermissionDescribePageState();
}
class _PermissionDescribePageState extends State<PermissionDescribePage> with WidgetsBindingObserver {
Timer? _timerPermission;
bool theOpenAppSettings = false;
int theExecutionFrequency = 0;
@override
void initState() {
WidgetsBinding.instance.addObserver(this);
Future.delayed(const Duration(seconds: 3), () {
getCheckPermission(context);
});
super.initState();
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
print("-didChangeAppLifecycleState-" + state.toString());
switch (state) {
case AppLifecycleState.inactive: //
break;
case AppLifecycleState.resumed: //
if (theOpenAppSettings) {
getCheckPermission(context);
}
break;
case AppLifecycleState.paused: //
break;
case AppLifecycleState.detached: // APP结束时调用
break;
case AppLifecycleState.hidden:
// TODO: Handle this case.
}
}
@override
void dispose() {
_timerPermission?.cancel();
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
void getCheckPermission(BuildContext context) async {
theOpenAppSettings = false;
theExecutionFrequency++;
List<Permission> permissions = []; //
List<Permission> permanentRefusal = []; //
for (var i = 0; i < widget.permissions.length; i++) {
var p = widget.permissions[i];
var status = await p.status;
var shouldShowRequestRationale = await p.shouldShowRequestRationale;
if (!status.isGranted) {
if (status.isDenied) {
if (shouldShowRequestRationale) {
///
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: quickText(widget.title, fontWeight: FontWeight.bold),
content: quickText(widget.describe, maxLines: 20),
actions: [
ElevatedButton(
onPressed: () async => Navigator.of(context).pop(),
child: const Text('我已知晓'),
)
],
);
},
);
}
permissions.add(p);
} else if (await status.isPermanentlyDenied) {
permanentRefusal.add(p);
}
}
}
if (permissions.isNotEmpty) {
//
permanentRefusal.addAll(await getStoragePermission(context, permissions));
}
if (permanentRefusal.isNotEmpty) {
/// 使
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
content: quickText(widget.describe, maxLines: 20),
title: quickText(widget.title, fontWeight: FontWeight.bold),
actions: [
ElevatedButton(
onPressed: () async {
Navigator.of(context).pop();
theOpenAppSettings = true;
await AppSettings.openAppSettings(asAnotherTask: true);
},
child: const Text('前往APP权限设置'),
)
],
);
},
);
} else {
Navigator.of(Get.context ?? context).pop();
}
}
///
/// @param List<Permission> permissions
Future<List<Permission>> getStoragePermission(BuildContext context, List<Permission> permissions, [int executionFrequency = 0]) async {
Map<Permission, PermissionStatus> statusRes = await permissions.request();
List<Permission> permanentRefusal = []; //
List<Permission> keys = statusRes.keys.toList();
for (var i = 0; i < keys.length; i++) {
Permission key = keys[i];
PermissionStatus status = statusRes[key]!;
if (status.isPermanentlyDenied) {
///
permanentRefusal.add(key);
} else if (status.isDenied) {
///
///
/// 便
if (await key.shouldShowRequestRationale) {
///
/// TODO
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: quickText(widget.title, fontWeight: FontWeight.bold),
content: quickText(widget.describe, maxLines: 20),
actions: [
ElevatedButton(
onPressed: () async => Navigator.of(context).pop(),
child: const Text('我已知晓'),
)
],
);
},
);
}
if (permissions.length == 1 && key == permissions[0]) {
executionFrequency++;
}
if (executionFrequency <= 1) {
var res = await getStoragePermission(context, [key], executionFrequency);
permanentRefusal.addAll(res);
} else {
permanentRefusal.add(key);
}
// break;
}
}
return permanentRefusal;
}
@override
Widget build(BuildContext context) {
return PopScope(
canPop: false,
child: Container(
width: ScreenUtil().screenWidth,
height: ScreenUtil().screenHeight,
decoration: const BoxDecoration(color: Colors.transparent),
child: Column(
children: [
SizedBox(height: ScreenUtil().screenHeight * 0.1),
Container(
width: ScreenUtil().screenWidth * 0.9,
padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.r),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.5), //
spreadRadius: 2, //
blurRadius: 4, //
offset: Offset(0, 3), // X Y
),
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
quickText(widget.title, size: 24.sp),
quickText(widget.describe, maxLines: 20),
],
),
),
const Expanded(child: SizedBox()),
],
),
));
}
}
class PermissionDescribeUtil {
static PermissionDescribeUtil? _instance;
PermissionDescribeUtil._internal();
static get instance {
return _instance ??= PermissionDescribeUtil._internal();
}
///
void toLaunchPermissionRequest(
BuildContext context, {
required String title,
required String describe,
required List<Permission> permissions,
}) async {
var isGranted = false;
for (var i = 0; i < permissions.length; i++) {
var p = permissions[i];
if (!(await p.status.isGranted)) {
isGranted = true;
break;
}
}
if (isGranted) {
Navigator.of(Get.context ?? context).push(PageRouteBuilder(
opaque: false,
pageBuilder: (context, animation, secondaryAnimation) {
return PermissionDescribePage(
title: title,
describe: describe,
permissions: permissions,
);
}));
}
// await Navigator.of(context).push(
// transparentRoute<PermissionDescribePage>(
// builder: (context) => PermissionDescribePage(
// title: title,
// describe: describe,
// permissions: permissions,
// ),
// ),
// );
}
}
// Route transparentRoute<T>({
// required WidgetBuilder builder,
// RouteSettings? settings,
// }) {
// return PageRouteBuilder<T>(
// pageBuilder: (
// BuildContext context,
// Animation<double> animation,
// Animation<double> secondaryAnimation,
// ) {
// return builder(context);
// },
// transitionsBuilder: (_, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
// return child;
// },
// barrierDismissible: false, //
// // barrierColor: Colors.transparent, //
// );
// }

View File

@ -72,12 +72,22 @@ class MyApp extends StatelessWidget {
useMaterial3: false,
colorScheme: const ColorScheme.light(
//
primary: Color(0xFF8C68FF),
primary: Color(0xFF8C68FF),
)),
enableLog: true,
logWriterCallback: (text, {bool isError = false}) {
// isError ? LoggerUtils.e(text) : LoggerUtils.i(text);
},
routingCallback: (routing) {
String? currentRouter = routing?.current;
// print("当前路由:${currentRouter}");
// if ([Routes.home, Routes.myInfo].contains(currentRouter)) {
// SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
// statusBarIconBrightness: Brightness.light,
// systemStatusBarContrastEnforced: false,
// ));
// }
},
// flutter_localizations依赖
supportedLocales: const [
Locale('zh', 'CN'), //

View File

@ -1,25 +1,21 @@
import 'dart:async';
import 'package:app_settings/app_settings.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/utils/app_upgrade/upgradeLogic.dart';
import 'package:making_school_asignment_app/common/job/user_info.dart';
import 'package:making_school_asignment_app/common/job/user_info_detail.dart';
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:making_school_asignment_app/common/store/user_store.dart';
import 'package:making_school_asignment_app/common/utils/storage.dart';
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
import 'package:making_school_asignment_app/page/home_page/children/my_info.dart';
import 'package:making_school_asignment_app/page/home_page/home_logic.dart';
import 'package:making_school_asignment_app/page/home_page/home_view.dart';
import 'package:making_school_asignment_app/page/work_page/work_logic.dart';
import 'package:making_school_asignment_app/page/work_page/work_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:making_school_asignment_app/routes/app_pages.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:making_school_asignment_app/common/job/user_info.dart';
import 'package:making_school_asignment_app/common/utils/storage.dart';
import 'package:making_school_asignment_app/common/store/user_store.dart';
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
import 'package:making_school_asignment_app/page/home_page/home_view.dart';
import 'package:making_school_asignment_app/page/home_page/home_logic.dart';
import 'package:making_school_asignment_app/page/work_page/work_logic.dart';
import 'package:making_school_asignment_app/common/job/user_info_detail.dart';
import 'package:making_school_asignment_app/page/home_page/children/my_info.dart';
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:making_school_asignment_app/common/utils/app_upgrade/upgradeLogic.dart';
class StartPage extends StatefulWidget {
const StartPage({super.key});
@ -37,70 +33,16 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
late final List<Widget> _bodyList;
void getStoragePermission() async {
_timerPermission?.cancel();
_timerPermission = null;
var status = await Permission.storage.request();
if (status != PermissionStatus.granted) {
print(status);
if (status == PermissionStatus.denied) {
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: const Text("储存权限拒绝"),
content: const Text("为了提供更好的服务,需要获取到存储权限用于保存批阅笔记"),
actions: [
ElevatedButton(
onPressed: () async {
await AppSettings.openAppSettings(asAnotherTask: true);
Navigator.of(context).pop();
_timerPermission = Timer.periodic(const Duration(seconds: 30), (_) => getStoragePermission());
},
child: const Text('前往APP权限设置'),
)
],
);
},
);
return;
}
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: Text("内存权限"),
content: Text("为了提供更好的服务,需要获取到存储权限用于保存批阅笔记"),
actions: [
ElevatedButton(
onPressed: () async {
await Permission.storage.request();
Navigator.of(context).pop();
getStoragePermission();
},
child: Text('允许'),
)
],
);
},
);
}
}
@override
void initState() {
super.initState();
Future.delayed(const Duration(seconds: 3), () => FlutterNativeSplash.remove());
Future.delayed(const Duration(seconds: 4), () => getStoragePermission());
Get.put(HomeLogic());
Get.put(WorkLogic());
_bodyList = [const HomePage(), const WorkPage(), const MyInfo()];
// const WorkPage(),
_bodyList = [const HomePage(), const MyInfo()];
// APP
if (!_upgradeLogic.showUpgrade.value) _upgradeLogic.getAppUpgrade(context);
_timer?.cancel();
@ -148,7 +90,6 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.dark));
return WillPopScope(
child: Scaffold(
body: PageView(
@ -156,27 +97,28 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
physics: const BouncingScrollPhysics(),
onPageChanged: (index) {
_pageController._pageIndexState.pageIndex.value = index;
if (index == 2) {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
} else {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.dark));
}
// if (index == 2) {
// SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
// } else {
// SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.dark));
// }
},
children: _bodyList,
),
bottomNavigationBar: Obx(() {
return BottomNavigationBar(
backgroundColor: Colors.white,
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
label: '作业',
icon: getItemIcon('assets/images/ic_home_normal.png'),
activeIcon: getItemIcon('assets/images/ic_home_active.png'),
),
BottomNavigationBarItem(
label: '考试',
icon: getItemIcon('assets/images/ic_work_normal.png'),
activeIcon: getItemIcon('assets/images/ic_work_active.png'),
),
// BottomNavigationBarItem(
// label: '考试',
// icon: getItemIcon('assets/images/ic_work_normal.png'),
// activeIcon: getItemIcon('assets/images/ic_work_active.png'),
// ),
BottomNavigationBarItem(
label: '我的',
icon: getItemIcon('assets/images/ic_mine_normal.png'),

View File

@ -1,3 +1,4 @@
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -5,11 +6,13 @@ import 'package:functional_widget_annotation/functional_widget_annotation.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
import 'package:making_school_asignment_app/common/utils/permission_describe_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/configuration_files/index.dart';
import 'package:making_school_asignment_app/routes/app_pages.dart';
import 'package:permission_handler/permission_handler.dart';
import 'original_manuscript_handwriting/answer_handwriting_view.dart';
@ -24,9 +27,25 @@ class DropdownSwitchStudentsType extends StatefulWidget {
}
class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType> {
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
final logic = Get.find<HomeworkReviewLogic>();
final sateData = Get.find<HomeworkReviewLogic>().state.data;
@override
void initState() {
deviceInfoPlugin.androidInfo.then((androidInfo) {
Permission storagePermission = androidInfo.version.sdkInt >= 33 ? Permission.manageExternalStorage : Permission.storage;
PermissionDescribeUtil.instance.toLaunchPermissionRequest(
context,
title: '储存权限请求',
describe: "为了提供更好的服务,需要获取到存储权限用于保存批阅痕迹并上传",
permissions: [storagePermission],
);
});
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(

View File

@ -51,18 +51,12 @@ class _HomeworkReviewState extends State<HomeworkReview> {
child: Scaffold(
appBar: AppBar(
// titleSpacing: 0,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios),
onPressed: () => Get.back()),
leading: IconButton(icon: const Icon(Icons.arrow_back_ios), onPressed: () => Get.back()),
iconTheme: const IconThemeData(color: Colors.black),
title: quickText(sateData.param.value.homeworkName),
backgroundColor: Colors.white,
elevation: 0,
actions: [
const FavoriteWidget(),
SizedBox(width: 5.w),
const ReturnToHomepage()
],
actions: [const FavoriteWidget(), SizedBox(width: 5.w), const ReturnToHomepage()],
),
body: SafeArea(
child: Column(

View File

@ -19,6 +19,16 @@ class MyInfo extends StatefulWidget {
class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
late Rx<UserInfoDetail?> userInfo = UserStore.to.userDetailInfo;
@override
void initState() {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
statusBarColor: Colors.transparent, //
systemStatusBarContrastEnforced: false,
));
super.initState();
}
//
_showAlertDialog(context1) async {
await showDialog(
@ -26,31 +36,27 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
barrierDismissible: false,
context: context1,
builder: (context) {
return AlertDialog(
title: quickText("提示信息"),
content: quickText("您确定要退出登录吗?"),
actions: <Widget>[
TextButton(
child: quickText("取消"),
onPressed: () {
Navigator.pop(context, 'Cancle');
},
),
TextButton(
child: quickText("确定"),
onPressed: () async {
try {
UserStore.to.erase();
await StorageService.to.erase();
StorageService.to
.write(AppStorageKey.privacyAgreement.value, true);
Navigator.pop(context, "Ok");
Get.offAllNamed(Routes.login);
} catch (e) {
print(e);
}
})
]);
return AlertDialog(title: quickText("提示信息"), content: quickText("您确定要退出登录吗?"), actions: <Widget>[
TextButton(
child: quickText("取消"),
onPressed: () {
Navigator.pop(context, 'Cancle');
},
),
TextButton(
child: quickText("确定"),
onPressed: () async {
try {
UserStore.to.erase();
await StorageService.to.erase();
StorageService.to.write(AppStorageKey.privacyAgreement.value, true);
Navigator.pop(context, "Ok");
Get.offAllNamed(Routes.login);
} catch (e) {
print(e);
}
})
]);
});
}
@ -70,8 +76,7 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
fontSize: 13.sp,
);
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation) {
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
return Stack(
children: [
SizedBox(
@ -103,7 +108,7 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
children: [
Container(
height: 150.h,
padding: EdgeInsets.only(left: 20.r,right: 20.r),
padding: EdgeInsets.only(left: 20.r, right: 20.r),
// alignment: Alignment.center,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
@ -124,14 +129,13 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
margin: EdgeInsets.only(top: 0.h),
child: Text(
userInfo.value?.name ?? '请前往登录',
style: TextStyle(
fontSize: 16.sp, color: const Color(0xFF332A2A),fontWeight: FontWeight.w500),
style: TextStyle(fontSize: 16.sp, color: const Color(0xFF332A2A), fontWeight: FontWeight.w500),
),
),
),
const Spacer(),
InkWell(
onTap: (){
onTap: () {
_showAlertDialog(context);
},
child: Image.asset('assets/images/out_icon.png'),
@ -142,8 +146,7 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
SizedBox(height: 14.h),
Container(
margin: EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w),
padding:
EdgeInsets.symmetric(vertical: 15.h, horizontal: 16.w),
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 16.w),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.w)),
@ -159,17 +162,12 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('账号', style: personalInfoTitleStly),
Text(userInfo.value?.name ?? '请前往登录',
style: personalInfoValStly)
],
children: [Text('账号', style: personalInfoTitleStly), Text(userInfo.value?.name ?? '请前往登录', style: personalInfoValStly)],
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w),
padding:
EdgeInsets.symmetric(vertical: 15.h, horizontal: 16.w),
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 16.w),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.w)),
@ -183,19 +181,14 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
)
],
),
child:Row(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('所在学校', style: personalInfoTitleStly),
Text(userInfo.value?.schoolName ?? '',
style: personalInfoValStly)
],
children: [Text('所在学校', style: personalInfoTitleStly), Text(userInfo.value?.schoolName ?? '', style: personalInfoValStly)],
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 5.h, horizontal: 16.w),
padding:
EdgeInsets.symmetric(vertical: 15.h, horizontal: 16.w),
padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 16.w),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.w)),
@ -209,7 +202,7 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
)
],
),
child:InkWell(
child: InkWell(
onTap: () {
Get.toNamed(Routes.otherPage);
},
@ -226,8 +219,6 @@ class _MyInfoState extends State<MyInfo> with AutomaticKeepAliveClientMixin {
),
),
),
],
),
),

View File

@ -1,25 +1,15 @@
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/work_student.dart';
import 'package:making_school_asignment_app/common/utils/enum_untils.dart';
import 'package:making_school_asignment_app/common/utils/utils.dart';
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
import 'package:making_school_asignment_app/page/home_page/children/read_over/widget/annotate_list.dart';
import 'package:making_school_asignment_app/page/home_page/children/read_over/widget/task_list_item.dart';
import 'package:making_school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
import 'package:making_school_asignment_app/routes/app_pages.dart';
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
import 'read_over_logic.dart';
class ReadOverPage extends StatefulWidget {
const ReadOverPage({Key? key}) : super(key: key);
const ReadOverPage({super.key});
@override
State<ReadOverPage> createState() => _ReadOverPageState();
@ -29,6 +19,16 @@ class _ReadOverPageState extends State<ReadOverPage> {
final logic = Get.find<ReadOverLogic>();
final state = Get.find<ReadOverLogic>().state;
@override
void initState() {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarColor: Colors.transparent, //
statusBarIconBrightness: Brightness.light,
systemStatusBarContrastEnforced: false,
));
super.initState();
}
@override
Widget build(BuildContext context) {
return AnnotatedRegion(

View File

@ -24,12 +24,9 @@ class HomePage extends StatefulWidget {
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage>
with AutomaticKeepAliveClientMixin {
class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final logic = Get.find<HomeLogic>();
final state = Get
.find<HomeLogic>()
.state;
final state = Get.find<HomeLogic>().state;
@override
bool get wantKeepAlive => true;
@ -38,7 +35,8 @@ class _HomePageState extends State<HomePage>
void initState() {
super.initState();
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
statusBarColor: Colors.transparent, //
statusBarIconBrightness: Brightness.light,
systemStatusBarContrastEnforced: false,
));
}
@ -54,19 +52,20 @@ class _HomePageState extends State<HomePage>
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
enableControlFinishLoad: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
// footer: TaurusFooter(),
onRefresh: () async {
state.pageNumber = 1;
return logic.getList();
},
onLoad: () async {
if (state.workList.length < state.totalCount.value) {
state.pageNumber++;
return logic.getList();
}
},
// onLoad: () async {
// if (state.workList.length < state.totalCount.value) {
// state.pageNumber++;
// return logic.getList();
// }
// },
child: Stack(
children: [
Image.asset(
@ -78,10 +77,7 @@ class _HomePageState extends State<HomePage>
margin: EdgeInsets.only(top: 300.h),
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 20.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.r),
topRight: Radius.circular(30.r))),
color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(30.r), topRight: Radius.circular(30.r))),
child: Column(
children: [
SizedBox(
@ -89,10 +85,7 @@ class _HomePageState extends State<HomePage>
),
Text(
'我的作业管理',
style: TextStyle(
fontSize: 20.sp,
color: const Color(0xFF676666),
fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 20.sp, color: const Color(0xFF676666), fontWeight: FontWeight.w600),
),
SizedBox(
height: 15.r,
@ -102,21 +95,19 @@ class _HomePageState extends State<HomePage>
Expanded(
child: Obx(() {
return menuItem(
bgImg: 'assets/images/home_bg_01.png',
name: '作业批阅',
value: state.totalCount.value.toString(),
url: Routes.readOverPage);
bgImg: 'assets/images/home_bg_01.png',
name: '作业批阅',
value: state.totalCount.value.toString(),
url: Routes.readOverPage,
);
}),
),
SizedBox(
width: 20.r,
),
Expanded(
child: menuItem(
bgImg: 'assets/images/home_bg_02.png',
name: '知识点点掌握',
url: Routes.studentHistoryWorkPage,
page: 'points'),
child:
menuItem(bgImg: 'assets/images/home_bg_02.png', name: '知识点点掌握', url: Routes.studentHistoryWorkPage, page: 'points'),
),
],
),
@ -126,20 +117,14 @@ class _HomePageState extends State<HomePage>
Row(
children: [
Expanded(
child: menuItem(
bgImg: 'assets/images/home_bg_03.png',
name: '学生历史作业',
url: Routes.studentHistoryWorkPage,
page: 'history'),
child:
menuItem(bgImg: 'assets/images/home_bg_03.png', name: '学生历史作业', url: Routes.studentHistoryWorkPage, page: 'history'),
),
SizedBox(
width: 20.r,
),
Expanded(
child: menuItem(
bgImg: 'assets/images/home_bg_04.png',
name: '答题轨迹',
url: Routes.answerTrajectoryPage),
child: menuItem(bgImg: 'assets/images/home_bg_04.png', name: '答题轨迹', url: Routes.answerTrajectoryPage),
),
],
),
@ -149,14 +134,14 @@ class _HomePageState extends State<HomePage>
Row(
children: [
menuItem(
bgImg: 'assets/images/home_bg_05.png',
name: '优先批阅设定',
bgImg: 'assets/images/home_bg_05.png',
name: '优先批阅设定',
url: Routes.studentHistoryWorkPage,
page: 'set',),
page: 'set',
),
SizedBox(
width: 20.r,
),
],
),
SizedBox(height: 15.h),
@ -178,20 +163,18 @@ class _HomePageState extends State<HomePage>
}
}
Widget menuItem({required String bgImg, required String name, String? value,required String url,String? page}) {
Widget menuItem({required String bgImg, required String name, String? value, required String url, String? page}) {
return InkWell(
onTap: (){
onTap: () {
Get.toNamed(url, arguments: {'page': page ?? ''});
},
child: Container(
width: (Get.width - 60.r) / 2,
height: (Get.width - 60.r) / 2 * 86 / 164,
padding: EdgeInsets.symmetric(
vertical: 15.r, horizontal: 15.r),
padding: EdgeInsets.symmetric(vertical: 15.r, horizontal: 15.r),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
bgImg),
image: AssetImage(bgImg),
fit: BoxFit.contain,
),
),
@ -199,33 +182,26 @@ Widget menuItem({required String bgImg, required String name, String? value,requ
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment
.spaceBetween,
crossAxisAlignment: CrossAxisAlignment
.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
name,
style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF4F4F4F),
fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4F4F4F), fontWeight: FontWeight.w600),
),
if(value != null && value != '')
if (value != null && value != '')
Container(
width: 18.r,
height: 18.r,
alignment: Alignment.center,
decoration: BoxDecoration(
color: const Color(0xFFFF6969),
borderRadius: BorderRadius.all(
Radius.circular(9.r)),
borderRadius: BorderRadius.all(Radius.circular(9.r)),
),
child: Text(
value!,
style: TextStyle(fontSize: 10.sp,
color: Colors.white,
fontWeight: FontWeight.w600),),
style: TextStyle(fontSize: 10.sp, color: Colors.white, fontWeight: FontWeight.w600),
),
)
],
),
@ -252,10 +228,7 @@ class EntranceModel extends Object {
String navigationUrl;
String? page;
EntranceModel({required this.title,
required this.image,
required this.navigationUrl,
this.page});
EntranceModel({required this.title, required this.image, required this.navigationUrl, this.page});
}
@swidget
@ -264,8 +237,7 @@ Widget $termRow(BuildContext context, List<EntranceModel> items, int? data) {
Widget childWidget;
switch (leng) {
case 1:
childWidget =
Row(children: [Expanded(child: $TermItem(items[0], data!))]);
childWidget = Row(children: [Expanded(child: $TermItem(items[0], data!))]);
break;
case 2:
childWidget = Row(children: [
@ -300,13 +272,11 @@ Widget $termRow(BuildContext context, List<EntranceModel> items, int? data) {
childWidget = Container();
}
return Container(
padding: EdgeInsets.symmetric(horizontal: 14.w), child: childWidget);
return Container(padding: EdgeInsets.symmetric(horizontal: 14.w), child: childWidget);
}
@swidget
Widget $termItem(BuildContext context, EntranceModel e, int data,
{double? theHeight}) {
Widget $termItem(BuildContext context, EntranceModel e, int data, {double? theHeight}) {
bool isJob = e.title == '作业批阅';
return Material(
@ -335,14 +305,10 @@ Widget $termItem(BuildContext context, EntranceModel e, int data,
badgeStyle: badges.BadgeStyle(
badgeColor: const Color.fromRGBO(255, 105, 105, 1),
shape: badges.BadgeShape.square,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.r),
topRight: Radius.circular(8.5.r),
bottomRight: Radius.circular(8.5.r)),
borderRadius: BorderRadius.only(topLeft: Radius.circular(10.r), topRight: Radius.circular(8.5.r), bottomRight: Radius.circular(8.5.r)),
// borderSide: BorderSide(color: Colors.white, width: 2),
elevation: 1,
padding: EdgeInsets.symmetric(
horizontal: Utils.isPad() ? 11.w : 16.w, vertical: 2.h),
padding: EdgeInsets.symmetric(horizontal: Utils.isPad() ? 11.w : 16.w, vertical: 2.h),
),
position: badges.BadgePosition.topEnd(top: 10.r, end: 10.r),
child: Container(
@ -363,29 +329,21 @@ Widget $termItem(BuildContext context, EntranceModel e, int data,
alignment: Alignment.center,
child: isJob
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(e.image,
height: 32.r, width: 32.r, fit: BoxFit.cover),
SizedBox(height: 6.r),
quickText(e.title,
size: 12.sp,
color: const Color.fromRGBO(79, 79, 79, 1),
fontWeight: FontWeight.w500),
],
)
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(e.image, height: 32.r, width: 32.r, fit: BoxFit.cover),
SizedBox(height: 6.r),
quickText(e.title, size: 12.sp, color: const Color.fromRGBO(79, 79, 79, 1), fontWeight: FontWeight.w500),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(e.image,
height: 32.r, width: 32.r, fit: BoxFit.cover),
SizedBox(width: 6.r),
quickText(e.title,
size: 12.sp,
color: const Color.fromRGBO(79, 79, 79, 1),
fontWeight: FontWeight.w500),
],
),
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(e.image, height: 32.r, width: 32.r, fit: BoxFit.cover),
SizedBox(width: 6.r),
quickText(e.title, size: 12.sp, color: const Color.fromRGBO(79, 79, 79, 1), fontWeight: FontWeight.w500),
],
),
),
)),
);

View File

@ -25,8 +25,10 @@ class _LoginPageState extends State<LoginPage> {
@override
void initState() {
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
statusBarColor: Colors.transparent, //
));
Future.delayed(Duration.zero, () => upgradeLogic.getAppUpgrade(context));
Future.delayed(Duration.zero, () => sysProtocol(context));
super.initState();
@ -40,8 +42,6 @@ class _LoginPageState extends State<LoginPage> {
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(statusBarIconBrightness: Brightness.light));
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
@ -62,12 +62,18 @@ class _LoginPageState extends State<LoginPage> {
children: [
Positioned(
top: 0,
left: 0,
child: Image.asset('assets/images/logo_banner.png',width: Get.width,fit: BoxFit.fill,)),
left: 0,
child: Image.asset(
'assets/images/logo_banner.png',
width: Get.width,
fit: BoxFit.fill,
)),
SingleChildScrollView(
child: Column(
children: [
SizedBox(height: 130.r,),
SizedBox(
height: 130.r,
),
Container(
width: 77.w,
height: 77.w,
@ -75,17 +81,15 @@ class _LoginPageState extends State<LoginPage> {
child: SizedBox(
height: 77.w,
width: 77.w,
child: Image.asset('assets/images/login_logo_icon.png',
fit: BoxFit.cover),
child: Image.asset('assets/images/login_logo_icon.png', fit: BoxFit.cover),
),
),
Container(
margin: EdgeInsets.only(top: 90.r),
padding: EdgeInsets.only(
top: 50.h, bottom: 16.h, left: 40.w, right: 40.w),
padding: EdgeInsets.only(top: 50.h, bottom: 16.h, left: 40.w, right: 40.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(30.r),topRight: Radius.circular(30.r)),
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(30.r), topRight: Radius.circular(30.r)),
/*boxShadow: const [
BoxShadow(
color: Color.fromRGBO(46, 91, 255, 0.1),
@ -97,13 +101,13 @@ class _LoginPageState extends State<LoginPage> {
),
child: Column(children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 15.w,),
padding: EdgeInsets.symmetric(
horizontal: 15.w,
),
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.w, color: const Color(0xFF434343)),
borderRadius:
BorderRadius.all(Radius.circular(17.w)),
border: Border.all(width: 1.w, color: const Color(0xFF434343)),
borderRadius: BorderRadius.all(Radius.circular(17.w)),
),
child: TextField(
controller: state.userNameController,
@ -127,7 +131,7 @@ class _LoginPageState extends State<LoginPage> {
// labelText: "账号",
labelStyle: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF434343),
color: const Color(0xFF434343),
),
border: InputBorder.none,
isDense: true,
@ -154,10 +158,8 @@ class _LoginPageState extends State<LoginPage> {
padding: EdgeInsets.symmetric(horizontal: 15.w),
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.w, color: const Color(0xFF434343)),
borderRadius:
BorderRadius.all(Radius.circular(17.w)),
border: Border.all(width: 1.w, color: const Color(0xFF434343)),
borderRadius: BorderRadius.all(Radius.circular(17.w)),
),
child: TextField(
focusNode: state.pwdFocus,
@ -169,7 +171,7 @@ class _LoginPageState extends State<LoginPage> {
// textInputAction: state.isShowPwd.value?TextInputAction.go:TextInputAction.next,
// onSubmitted: (val) => toLogin(),
style: TextStyle(
color: const Color(0xFF434343),
color: const Color(0xFF434343),
fontSize: 14.sp,
),
decoration: InputDecoration(
@ -192,15 +194,12 @@ class _LoginPageState extends State<LoginPage> {
),
suffixIcon: InkWell(
onTap: () {
state.isShowPwd.value =
!state.isShowPwd.value;
state.isShowPwd.value = !state.isShowPwd.value;
},
child: Padding(
padding: EdgeInsets.only(right: 5.r),
child: Image.asset(
state.isShowPwd.value
? 'assets/images/eye_default.png'
: 'assets/images/eye_active.png',
state.isShowPwd.value ? 'assets/images/eye_default.png' : 'assets/images/eye_active.png',
width: 15.r,
height: 15.r,
),
@ -208,7 +207,7 @@ class _LoginPageState extends State<LoginPage> {
),
hintStyle: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF434343),
color: const Color(0xFF434343),
),
border: InputBorder.none,
// labelText: "密码",
@ -236,34 +235,23 @@ class _LoginPageState extends State<LoginPage> {
child: Checkbox(
// activeColor: Colors.transparent, //
activeColor:
Theme.of(context).primaryColor,
activeColor: Theme.of(context).primaryColor,
// checkColor: Colors.white,
value: state.keepPwd.value,
onChanged: (value) {
// Get.focusScope?.nextFocus();
FocusScope.of(context)
.requestFocus(state.pwdFocus);
FocusScope.of(context)
.requestFocus(state.theFocus);
state.keepPwd.value =
value ?? false;
FocusScope.of(context).requestFocus(state.pwdFocus);
FocusScope.of(context).requestFocus(state.theFocus);
state.keepPwd.value = value ?? false;
},
side: WidgetStateBorderSide
.resolveWith(
side: WidgetStateBorderSide.resolveWith(
(Set<WidgetState> states) {
if (states.contains(
WidgetState.selected)) {
if (states.contains(WidgetState.selected)) {
//
return BorderSide(
width: 1.5.r,
color: Theme.of(context)
.primaryColor);
return BorderSide(width: 1.5.r, color: Theme.of(context).primaryColor);
}
//绿
return BorderSide(
width: 1.r,
color: const Color(0xFF434343));
return BorderSide(width: 1.r, color: const Color(0xFF434343));
},
)),
);
@ -274,18 +262,15 @@ class _LoginPageState extends State<LoginPage> {
Utils.hideKeyboard();
Get.focusScope?.nextFocus();
Get.focusScope?.nextFocus();
FocusScope.of(context)
.requestFocus(state.pwdFocus);
FocusScope.of(context)
.requestFocus(state.theFocus);
state.keepPwd.value =
!state.keepPwd.value;
FocusScope.of(context).requestFocus(state.pwdFocus);
FocusScope.of(context).requestFocus(state.theFocus);
state.keepPwd.value = !state.keepPwd.value;
},
child: Text(
'记住密码',
style: TextStyle(
fontSize: 12.sp,
color:const Color(0xFF434343),
color: const Color(0xFF434343),
),
),
),
@ -307,9 +292,7 @@ class _LoginPageState extends State<LoginPage> {
return Container(
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
color: state.canLogin.value
? const Color(0xFF8C68FF)
: const Color(0xFFdddddd),
color: state.canLogin.value ? const Color(0xFF8C68FF) : const Color(0xFFdddddd),
/*boxShadow: [
BoxShadow(
color:
@ -326,9 +309,7 @@ class _LoginPageState extends State<LoginPage> {
alignment: Alignment.center,
width: double.infinity,
height: 50.h,
child: Text('登 录',
style: TextStyle(
fontSize: 16.sp, color: Colors.white)),
child: Text('登 录', style: TextStyle(fontSize: 16.sp, color: Colors.white)),
);
}),
),
@ -350,22 +331,16 @@ class _LoginPageState extends State<LoginPage> {
state.pwdFocus);
FocusScope.of(context).requestFocus(
state.theFocus);*/
state.readAgreement.value =
value ?? false;
state.readAgreement.value = value ?? false;
},
side: WidgetStateBorderSide.resolveWith(
(Set<WidgetState> states) {
if (states
.contains(WidgetState.selected)) {
if (states.contains(WidgetState.selected)) {
//
return BorderSide(
width: 1.5.r,
color: Theme.of(context)
.primaryColor);
return BorderSide(width: 1.5.r, color: Theme.of(context).primaryColor);
}
//绿
return BorderSide(
width: 1.r, color: const Color(0xFF434343));
return BorderSide(width: 1.r, color: const Color(0xFF434343));
},
),
),
@ -374,9 +349,7 @@ class _LoginPageState extends State<LoginPage> {
),
InkWell(
onTap: () {
Get.toNamed(Routes.agreementPage, arguments: {
"type": AGREEMENT_KEY.USER_AGREEMENT.name
});
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.USER_AGREEMENT.name});
},
child: quickText(
'请仔细阅读',
@ -385,15 +358,11 @@ class _LoginPageState extends State<LoginPage> {
),
InkWell(
onTap: () {
Get.toNamed(Routes.agreementPage, arguments: {
"type": AGREEMENT_KEY.USER_AGREEMENT.name
});
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.USER_AGREEMENT.name});
},
child: Text(
'《用户协议》',
style: TextStyle(
fontSize: 12.r,
color: Theme.of(context).primaryColor),
style: TextStyle(fontSize: 12.r, color: Theme.of(context).primaryColor),
),
),
],

View File

@ -37,10 +37,6 @@ class _WorkPageState extends State<WorkPage> with AutomaticKeepAliveClientMixin
Widget build(BuildContext context) {
super.build(context);
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
systemStatusBarContrastEnforced: false,
));
return Scaffold(
backgroundColor: const Color.fromRGBO(244, 244, 244, 1),
body: OrientationBuilder(

View File

@ -7,6 +7,7 @@ import Foundation
import auto_updater_macos
import connectivity_plus
import device_info_plus
import package_info_plus
import path_provider_foundation
import sqflite
@ -15,6 +16,7 @@ import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AutoUpdaterMacosPlugin.register(with: registry.registrar(forPlugin: "AutoUpdaterMacosPlugin"))
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@ -96,6 +96,8 @@ dependencies:
flutter_native_splash: ^2.4.1
icons_launcher: ^2.1.7
app_settings: ^5.1.1
device_info_plus: ^11.1.0
dev_dependencies:

View File

@ -167,6 +167,20 @@
@ -190,7 +204,7 @@
body {
margin: 0;
min-height: 100%;
background-color: #eeeeee;
background-color: #FFFFFF;
background-size: 100% 100%;
}