feat: 减少日志,增强状态,减少监听

This commit is contained in:
2025-12-03 18:06:47 -08:00
parent 33b9cd34f1
commit 5bd77511cc
7 changed files with 161 additions and 180 deletions
@@ -35,7 +35,6 @@ class _HIEdgeSwipeDetectorState extends State<HIEdgeSwipeDetector> {
bool _fromRight = false;
@override
Widget build(BuildContext context) {
KRLogUtil.kr_d('HIEdgeSwipeDetector build');
return Stack(
fit: StackFit.expand,
children: [
+15 -15
View File
@@ -39,23 +39,23 @@ class KRCountryFlag extends StatelessWidget {
@override
Widget build(BuildContext context) {
// 🔍 调试日志
if (kDebugMode) {
print('🏳️ KRCountryFlag.build 被调用');
}
if (kDebugMode) {
print(' - 原始 countryCode: "$countryCode"');
}
if (kDebugMode) {
print(' - countryCode.isEmpty: ${countryCode.isEmpty}');
}
if (kDebugMode) {
print(' - countryCode.length: ${countryCode.length}');
}
// if (kDebugMode) {
// print('🏳️ KRCountryFlag.build 被调用');
// }
// if (kDebugMode) {
// print(' - 原始 countryCode: "$countryCode"');
// }
// if (kDebugMode) {
// print(' - countryCode.isEmpty: ${countryCode.isEmpty}');
// }
// if (kDebugMode) {
// print(' - countryCode.length: ${countryCode.length}');
// }
final processedCode = _getCountryCode(countryCode);
if (kDebugMode) {
print(' - 处理后 code: "$processedCode"');
}
// if (kDebugMode) {
// print(' - 处理后 code: "$processedCode"');
// }
// 如果国家代码为空,显示占位符
if (countryCode.isEmpty) {