@@ -31,7 +31,7 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
3131 final _searchFocusNode = FocusNode ();
3232
3333 void onTap (int index) {
34- if (index == 0 || current.isEmpty) {
34+ if (currenciesWithoutSelected[ index] == current || current.isEmpty) {
3535 // ignore if already selected currency
3636 return ;
3737 }
@@ -212,7 +212,7 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
212212 "currencySelect_${currenciesWithoutSelected [index ]}" ),
213213 child: RoundedContainer (
214214 padding: const EdgeInsets .all (0 ),
215- color: index == 0
215+ color: currenciesWithoutSelected[ index] == current
216216 ? CFColors .selected
217217 : CFColors .white,
218218 child: RawMaterialButton (
@@ -238,7 +238,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
238238 materialTapTargetSize:
239239 MaterialTapTargetSize .shrinkWrap,
240240 value: true ,
241- groupValue: index == 0 ,
241+ groupValue: currenciesWithoutSelected[
242+ index] ==
243+ current,
242244 onChanged: (_) {
243245 onTap (index);
244246 },
@@ -253,7 +255,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
253255 children: [
254256 Text (
255257 currenciesWithoutSelected[index],
256- key: (index == 0 )
258+ key: (currenciesWithoutSelected[
259+ index] ==
260+ current)
257261 ? const Key (
258262 "selectedCurrencySettingsCurrencyText" )
259263 : null ,
@@ -269,7 +273,9 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
269273 currenciesWithoutSelected[
270274 index]] ??
271275 "" ,
272- key: (index == 0 )
276+ key: (currenciesWithoutSelected[
277+ index] ==
278+ current)
273279 ? const Key (
274280 "selectedCurrencySettingsCurrencyTextDescription" )
275281 : null ,
0 commit comments