This commit is contained in:
M
2020-10-29 20:10:09 +02:00
parent b8e435ea8e
commit 882f13011c
4 changed files with 261 additions and 258 deletions
@@ -39,31 +39,31 @@ abstract class DashboardViewModelBase with Store {
filterItems = {
S.current.transactions: [
FilterItem(
value: transactionFilterStore.displayIncoming,
value: () => transactionFilterStore.displayIncoming,
caption: S.current.incoming,
onChanged: (value) => transactionFilterStore.toggleIncoming()),
FilterItem(
value: transactionFilterStore.displayOutgoing,
value: () => transactionFilterStore.displayOutgoing,
caption: S.current.outgoing,
onChanged: (value) => transactionFilterStore.toggleOutgoing()),
FilterItem(
value: false,
caption: S.current.transactions_by_date,
onChanged: null),
// FilterItem(
// value: () => false,
// caption: S.current.transactions_by_date,
// onChanged: null),
],
S.current.trades: [
FilterItem(
value: tradeFilterStore.displayXMRTO,
value: () => tradeFilterStore.displayXMRTO,
caption: 'XMR.TO',
onChanged: (value) => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.xmrto)),
FilterItem(
value: tradeFilterStore.displayChangeNow,
value: () => tradeFilterStore.displayChangeNow,
caption: 'Change.NOW',
onChanged: (value) => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.changeNow)),
FilterItem(
value: tradeFilterStore.displayMorphToken,
value: () => tradeFilterStore.displayMorphToken,
caption: 'MorphToken',
onChanged: (value) => tradeFilterStore
.toggleDisplayExchange(ExchangeProviderDescription.morphToken)),
+1 -1
View File
@@ -1,7 +1,7 @@
class FilterItem {
FilterItem({this.value, this.caption, this.onChanged});
bool value;
bool Function() value;
String caption;
Function(bool) onChanged;
}