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