Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions lib/pages/settings_views/global_settings_view/currency_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
final _searchFocusNode = FocusNode();

void onTap(int index) {
if (index == 0 || current.isEmpty) {
if (currenciesWithoutSelected[index] == current || current.isEmpty) {
// ignore if already selected currency
return;
}
Expand Down Expand Up @@ -212,7 +212,7 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
"currencySelect_${currenciesWithoutSelected[index]}"),
child: RoundedContainer(
padding: const EdgeInsets.all(0),
color: index == 0
color: currenciesWithoutSelected[index] == current
? CFColors.selected
: CFColors.white,
child: RawMaterialButton(
Expand All @@ -238,7 +238,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
value: true,
groupValue: index == 0,
groupValue: currenciesWithoutSelected[
index] ==
current,
onChanged: (_) {
onTap(index);
},
Expand All @@ -253,7 +255,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
children: [
Text(
currenciesWithoutSelected[index],
key: (index == 0)
key: (currenciesWithoutSelected[
index] ==
current)
? const Key(
"selectedCurrencySettingsCurrencyText")
: null,
Expand All @@ -269,7 +273,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
currenciesWithoutSelected[
index]] ??
"",
key: (index == 0)
key: (currenciesWithoutSelected[
index] ==
current)
? const Key(
"selectedCurrencySettingsCurrencyTextDescription")
: null,
Expand Down