修正切换和国旗问题

(cherry picked from commit bec2464da85e981636077276de36b2ea5f6c40f4)
This commit is contained in:
2025-10-31 08:10:44 -07:00
committed by speakeloudest
parent 7083369cd4
commit 138209929b
5 changed files with 166 additions and 10 deletions
@@ -79,9 +79,14 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
children: [
Row(
children: [
KRCountryFlag(
countryCode: controller.kr_getCurrentNodeCountry(),
),
// 🔧 修复:使用 Obx 包裹确保国旗响应式更新
Obx(() {
final countryCode = controller.kr_getCurrentNodeCountry();
print('🌍 ConnectionInfo 更新,国家代码: $countryCode');
return KRCountryFlag(
countryCode: countryCode,
);
}),
SizedBox(width: 10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,