diff --git a/lib/app/modules/hi_node_list/views/hi_node_list_view.dart b/lib/app/modules/hi_node_list/views/hi_node_list_view.dart index 85a4467..4861625 100755 --- a/lib/app/modules/hi_node_list/views/hi_node_list_view.dart +++ b/lib/app/modules/hi_node_list/views/hi_node_list_view.dart @@ -539,12 +539,22 @@ class HINodeListView extends GetView { } // 4. 返回最终的 Text 组件 - return Text( - delayText, - style: KrAppTextStyle( - fontSize: 10, - color: delayColor, // 使用动态计算出的颜色 - fontWeight: FontWeight.w500, + // return Text( + // delayText, + // style: KrAppTextStyle( + // fontSize: 10, + // color: delayColor, // 使用动态计算出的颜色 + // fontWeight: FontWeight.w500, + // ), + // ); + + return Container( + width: 4, + height: 4, + // 使用 BoxDecoration 来设置形状和颜色 + decoration: BoxDecoration( + color: delayColor, // ✅ 核心:使用之前逻辑计算出的动态颜色 + // shape: BoxShape.circle, // 使用圆形看起来更柔和,也可以用 BoxShape.rectangle ), ); }), diff --git a/lib/main.dart b/lib/main.dart index 98db8e7..bf601d9 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; // import 'package:flutter_easyloading/flutter_easyloading.dart'; // 已替换为自定义组件 import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:flutter/services.dart'; // import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart'; @@ -37,6 +38,12 @@ void main() async { // ✅ 等待 Flutter 确保窗口尺寸准备完毕(关键修复) await Future.delayed(const Duration(milliseconds: 100)); + if (Platform.isAndroid || Platform.isIOS) { + await SystemChrome.setPreferredOrientations( + [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown], + ); + } + // 初始化日志系统 KRLogUtil.kr_init(); diff --git a/pubspec.yaml b/pubspec.yaml index 22ad15f..983d3a5 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.0.1 +version: 0.0.3 environment: sdk: '>=3.5.0 <4.0.0'