mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-23 06:38:35 +02:00
CAKE-222 | applied adaptive picker to send and settings pages
This commit is contained in:
@@ -6,15 +6,13 @@ class PickerListItem<ItemType> extends SettingsListItem {
|
||||
{@required String title,
|
||||
@required this.selectedItem,
|
||||
@required this.items,
|
||||
void Function(ItemType item) onItemSelected,
|
||||
this.isAlwaysShowScrollThumb = false})
|
||||
void Function(ItemType item) onItemSelected})
|
||||
: _onItemSelected = onItemSelected,
|
||||
super(title);
|
||||
|
||||
final ItemType Function() selectedItem;
|
||||
final List<ItemType> items;
|
||||
final void Function(ItemType item) _onItemSelected;
|
||||
final bool isAlwaysShowScrollThumb;
|
||||
|
||||
void onItemSelected(dynamic item) {
|
||||
if (item is ItemType) {
|
||||
|
||||
@@ -55,7 +55,6 @@ abstract class SettingsViewModelBase with Store {
|
||||
PickerListItem(
|
||||
title: S.current.settings_currency,
|
||||
items: FiatCurrency.all,
|
||||
isAlwaysShowScrollThumb: true,
|
||||
selectedItem: () => fiatCurrency,
|
||||
onItemSelected: (FiatCurrency currency) =>
|
||||
setFiatCurrency(currency)),
|
||||
@@ -63,8 +62,6 @@ abstract class SettingsViewModelBase with Store {
|
||||
title: S.current.settings_fee_priority,
|
||||
items: TransactionPriority.forWalletType(wallet.type),
|
||||
selectedItem: () => transactionPriority,
|
||||
isAlwaysShowScrollThumb:
|
||||
TransactionPriority.forWalletType(wallet.type).length > 3,
|
||||
onItemSelected: (TransactionPriority priority) =>
|
||||
_settingsStore.transactionPriority = priority),
|
||||
SwitcherListItem(
|
||||
|
||||
Reference in New Issue
Block a user