From 828f353d26011877629ba350478fcfcbd18e0e48 Mon Sep 17 00:00:00 2001 From: Eddie Date: Tue, 6 Sep 2022 16:44:29 -0600 Subject: [PATCH] Fix for localeButton not updating --- lib/ui/common/controls/locale_button.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ui/common/controls/locale_button.dart b/lib/ui/common/controls/locale_button.dart index 76b262e5..5d958d95 100644 --- a/lib/ui/common/controls/locale_button.dart +++ b/lib/ui/common/controls/locale_button.dart @@ -25,7 +25,12 @@ class LocaleButton extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular($styles.corners.md)), ), padding: EdgeInsets.all($styles.insets.sm), - child: Text($strings.localeSwapButton, style: $styles.text.btn.copyWith(color: $styles.colors.white)), + child: ValueListenableBuilder( + valueListenable: settingsLogic.currentLocale, + builder: (_, __, ___) { + return Text($strings.localeSwapButton, style: $styles.text.btn.copyWith(color: $styles.colors.white)); + }, + ), ), ); }