CAKE-329 | applied observable list to items in the unspent_coins_list_view_model.dart

This commit is contained in:
OleksandrSobol
2021-05-26 19:10:46 +03:00
parent aca8e8a292
commit b71e85b112
2 changed files with 20 additions and 19 deletions
@@ -37,11 +37,12 @@ class UnspentCoinsListViewModel = UnspentCoinsListViewModelBase with _$UnspentCo
abstract class UnspentCoinsListViewModelBase with Store {
@computed
List<UnspentCoinsItem> get items => unspentCoinsMap.map((elem) =>
UnspentCoinsItem(
address: elem["address"] as String,
amount: elem["amount"] as String,
isFrozen: elem["isFrozen"] as bool,
note: elem["note"] as String
)).toList();
ObservableList<UnspentCoinsItem> get items =>
ObservableList.of(unspentCoinsMap.map((elem) =>
UnspentCoinsItem(
address: elem["address"] as String,
amount: elem["amount"] as String,
isFrozen: elem["isFrozen"] as bool,
note: elem["note"] as String
)));
}