CAKE-341 | fixed scrollbar for currency_picker.dart; applied receive currency list to exchange_template_page.dart

This commit is contained in:
OleksandrSobol
2021-06-03 18:38:41 +03:00
parent 72a39fd43b
commit 8e62f2f811
3 changed files with 6 additions and 4 deletions
@@ -176,7 +176,7 @@ class ExchangeTemplatePage extends BasePage {
initialIsAddressEditable:
exchangeViewModel.isReceiveAddressEnabled,
isAmountEstimated: true,
currencies: CryptoCurrency.all,
currencies: exchangeViewModel.receiveCurrencies,
onCurrencySelected: (currency) =>
exchangeViewModel.changeReceiveCurrency(
currency: currency),
@@ -45,6 +45,7 @@ class CurrencyPickerState extends State<CurrencyPicker> {
color: Palette.darkBlueCraiola,
);
final int crossAxisCount = 3;
final int maxNumberItemsInAlert = 12;
final int itemsCount;
final double backgroundHeight = 280;
final double thumbHeight = 72;
@@ -148,6 +149,7 @@ class CurrencyPickerState extends State<CurrencyPicker> {
);
})
),
if (itemsCount > maxNumberItemsInAlert)
CakeScrollbar(
backgroundHeight: backgroundHeight,
thumbHeight: thumbHeight,