Commit b57da32b authored by 胡曲's avatar 胡曲

fix bugs

parent 764c66bb
{
"dart.flutterSdkPath": ".fvm/versions/3.41.9"
"dart.flutterSdkPath": ".fvm/versions/3.38.10"
}
\ No newline at end of file
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
......@@ -41,7 +41,6 @@ class _AbnormalListBodyState extends State<_AbnormalListBody> {
if (state.keys == null || state.keys!.isEmpty) return 1;
final total = _cubit.state.totalCount;
final nextKey = state.nextIntPageKey;
if (nextKey == null) return null;
if ((nextKey - 1) * AbnormalListCubit.pageSize >= total) {
return null;
}
......
......@@ -122,7 +122,8 @@ class _HomeViewState extends State<HomeView> with AutoRouteAwareStateMixin<HomeV
voltageAlarmTitle: alert.alertTitle,
voltageAlarmLocation: location,
voltageValue: alert.voltage,
alertContent: alert.alertContent,
alertContent: alert.alertContent.isNotEmpty ?
'(${alert.alertContent})' : '',
voltageWaitTime: alert.waitingDurationDesc,
voltageAlarmLevel: alert.alertLevelText,
alertCategory: alert.alertCategory,
......
......@@ -99,7 +99,7 @@ class VoltageOperateBlock extends StatelessWidget {
width: double.infinity,
margin: EdgeInsets.only(left: 80.w, bottom: 20.h),
child: Text(
'电压$voltageValue ${'($alertContent)'}·$voltageWaitTime',
'电压$voltageValue $alertContent·$voltageWaitTime',
style: TextStyle(
fontSize: 24.sp,
color: const Color.fromRGBO(100, 116, 139, 1.0),
......
......@@ -83,6 +83,7 @@ class InspectionCubit extends Cubit<InspectionState> {
return result.data
.map((e) => InspectionDevice.fromInspectionDeviceBO(e))
.where((device) => !device.name.contains('分控'))
.toList();
}
......
......@@ -28,7 +28,7 @@ class _PasswordFieldState extends State<PasswordField> {
return TextFormField(
controller: widget.controller,
obscureText: _obscureText,
style: TextStyle(color: Color(0xFF333333), fontSize: 28.sp),
style: TextStyle(color: const Color(0xFF333333), fontSize: 28.sp),
validator: (val) {
if (val == null || val.isEmpty) {
return "密码不能为空";
......@@ -38,13 +38,13 @@ class _PasswordFieldState extends State<PasswordField> {
decoration: InputDecoration(
filled: true,
hintText: "password",
hintStyle: TextStyle(color: Color(0xFF999999), fontSize: 28.sp),
prefixIcon: Icon(Icons.lock, color: Color(0xFF999999), size: 40.w),
hintStyle: TextStyle(color: const Color(0xFF999999), fontSize: 28.sp),
prefixIcon: Icon(Icons.lock, color: const Color(0xFF999999), size: 40.w),
prefixIconConstraints: BoxConstraints(minWidth: 80.w, minHeight: 80.w),
suffixIcon: IconButton(
icon: Icon(
_obscureText ? Icons.visibility_off : Icons.visibility,
color: Color(0xFF999999),
color: const Color(0xFF999999),
size: 40.w,
),
onPressed: _toggleVisibility,
......@@ -62,19 +62,19 @@ class _PasswordFieldState extends State<PasswordField> {
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Color(0xFFF5F7FA), width: 1),
borderSide: const BorderSide(color: Color(0xFFF5F7FA), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Color(0xFFF5F7FA), width: 1),
borderSide: const BorderSide(color: Color(0xFFF5F7FA), width: 1),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Colors.red, width: 1),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Colors.red, width: 1.5),
borderSide: const BorderSide(color: Colors.red, width: 1.5),
),
),
);
......
......@@ -13,7 +13,7 @@ class UsernameField extends StatelessWidget {
Widget build(BuildContext context) {
return TextFormField(
controller: controller,
style: TextStyle(color: Color(0xFF333333), fontSize: 28.sp),
style: TextStyle(color: const Color(0xFF333333), fontSize: 28.sp),
validator: (val) {
if (val == null || val.isEmpty) {
return "用户名不能为空哦";
......@@ -23,8 +23,8 @@ class UsernameField extends StatelessWidget {
decoration: InputDecoration(
filled: true,
hintText: "admin",
hintStyle: TextStyle(color: Color(0xFF999999), fontSize: 28.sp),
prefixIcon: Icon(Icons.person, color: Color(0xFF999999), size: 40.w),
hintStyle: TextStyle(color: const Color(0xFF999999), fontSize: 28.sp),
prefixIcon: Icon(Icons.person, color: const Color(0xFF999999), size: 40.w),
prefixIconConstraints: BoxConstraints(minWidth: 80.w, minHeight: 80.w),
contentPadding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 24.w),
helperText: " ",
......@@ -38,19 +38,19 @@ class UsernameField extends StatelessWidget {
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Color(0xFFF5F7FA), width: 1),
borderSide: const BorderSide(color: Color(0xFFF5F7FA), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Color(0xFFF5F7FA), width: 1),
borderSide: const BorderSide(color: Color(0xFFF5F7FA), width: 1),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Colors.red, width: 1),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.w),
borderSide: BorderSide(color: Colors.red, width: 1),
borderSide: const BorderSide(color: Colors.red, width: 1),
),
),
);
......
......@@ -41,7 +41,6 @@ class _ReportDeviceListBodyState extends State<_ReportDeviceListBody> {
if (state.keys == null || state.keys!.isEmpty) return 1;
final total = _cubit.state.totalCount;
final nextKey = state.nextIntPageKey;
if (nextKey == null) return null;
if ((nextKey - 1) * DeviceListCubit.pageSize >= total) {
return null;
}
......
......@@ -141,10 +141,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.1"
version: "1.4.0"
checked_yaml:
dependency: transitive
description:
......@@ -404,10 +404,10 @@ packages:
dependency: "direct main"
description:
name: fluttertoast
sha256: "7903c9d5339173497bfecbc23bc4212f5a87e0edfac2e1693fb74465ea67da7e"
sha256: "144ddd74d49c865eba47abe31cbc746c7b311c82d6c32e571fd73c4264b740e2"
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.1.0"
version: "9.0.0"
frontend_server_client:
dependency: transitive
description:
......@@ -572,18 +572,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.19"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.13.0"
version: "0.11.1"
meta:
dependency: transitive
description:
......@@ -636,10 +636,10 @@ packages:
dependency: transitive
description:
name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.5"
version: "2.1.6"
path_provider_android:
dependency: transitive
description:
......@@ -660,18 +660,18 @@ packages:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
sha256: "58c2005f147315b11e9b4a7bc889cd5203e250cba8e3f012dae259b4972b5c16"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
version: "2.2.2"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
sha256: "484838772624c3a4b94f1e44a3e19897fee738f2d5c4ce448443b0417f7c9dda"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
version: "2.1.3"
path_provider_windows:
dependency: transitive
description:
......@@ -841,10 +841,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.10"
version: "0.7.7"
timing:
dependency: transitive
description:
......@@ -942,5 +942,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.11.0 <4.0.0"
flutter: ">=3.41.0"
dart: ">=3.10.3 <4.0.0"
flutter: ">=3.38.4"
......@@ -42,7 +42,7 @@ dependencies:
flutter_bloc: ^8.1.5
equatable: ^2.0.5
flutter_screenutil: ^5.9.3
fluttertoast: ^9.1.0
fluttertoast: ^9.0.0
loading_animation_widget: ^1.3.0
# fl_chart: ^1.2.0
flutter_switch: ^0.3.2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment