feat: 13. 国家节点列表用4・4方块展示节点连接状态

14.禁止横屏
This commit is contained in:
2025-11-30 01:36:26 -08:00
parent 95f8f3afbe
commit d2ea8436f9
3 changed files with 24 additions and 7 deletions
@@ -539,12 +539,22 @@ class HINodeListView extends GetView<HINodeListController> {
}
// 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
),
);
}),
+7
View File
@@ -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();
+1 -1
View File
@@ -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'