feat: 减少日志,增强状态,减少监听
This commit is contained in:
@@ -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: [
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user