This commit is contained in:
Serhii
2022-12-26 20:41:21 +02:00
parent d893562dad
commit ca79052914
5 changed files with 79 additions and 88 deletions
@@ -59,15 +59,15 @@ abstract class DashboardViewModelBase with Store {
filterItems = {
S.current.transactions: [
FilterItem(
value: transactionFilterStore.displayAll,
value: () => transactionFilterStore.displayAll,
caption: S.current.all_transactions,
onChanged: transactionFilterStore.toggleIAll),
onChanged: transactionFilterStore.toggleAll),
FilterItem(
value: transactionFilterStore.displayIncoming,
value: () => transactionFilterStore.displayIncoming,
caption: S.current.incoming,
onChanged:transactionFilterStore.toggleIncoming),
FilterItem(
value: transactionFilterStore.displayOutgoing,
value: () => transactionFilterStore.displayOutgoing,
caption: S.current.outgoing,
onChanged: transactionFilterStore.toggleOutgoing),
// FilterItem(
@@ -77,22 +77,22 @@ abstract class DashboardViewModelBase with Store {
],
S.current.trades: [
FilterItem(
value: tradeFilterStore.displayAllTrades,
value: () => tradeFilterStore.displayAllTrades,
caption: S.current.all_trades,
onChanged: () => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.all)),
FilterItem(
value: tradeFilterStore.displayChangeNow,
value: () => tradeFilterStore.displayChangeNow,
caption: ExchangeProviderDescription.changeNow.title,
onChanged: () => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.changeNow)),
FilterItem(
value: tradeFilterStore.displaySideShift,
value: () => tradeFilterStore.displaySideShift,
caption: ExchangeProviderDescription.sideShift.title,
onChanged: () => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.sideShift)),
FilterItem(
value: tradeFilterStore.displaySimpleSwap,
value: () => tradeFilterStore.displaySimpleSwap,
caption: ExchangeProviderDescription.simpleSwap.title,
onChanged: () => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.simpleSwap)),
+1 -1
View File
@@ -6,7 +6,7 @@ class FilterItem {
required this.caption,
required this.onChanged});
Observable<bool> value;
bool Function() value;
String caption;
Function onChanged;
}