CAKE-15 | implemented new design to dashboard page; created balance page; applied sync indicator to balance page; applied action buttons, page view and dots indicator to dashboard page; added colors of dashboard page to palette

This commit is contained in:
Oleksandr Sobol
2020-07-21 20:22:41 +03:00
parent f45875ba3a
commit 12ee8a519d
16 changed files with 400 additions and 133 deletions
+25
View File
@@ -9,6 +9,7 @@ import 'package:cake_wallet/core/wallet_base.dart';
import 'package:cake_wallet/src/domain/common/sync_status.dart';
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
import 'package:cake_wallet/store/app_store.dart';
import 'package:cake_wallet/generated/i18n.dart';
part 'dashboard_view_model.g.dart';
@@ -35,6 +36,8 @@ abstract class DashboardViewModelBase with Store {
if (_wallet is MoneroWallet) {
subname = _wallet.account?.label;
}
currentPage = 0;
}
@observable
@@ -43,12 +46,34 @@ abstract class DashboardViewModelBase with Store {
@observable
String name;
@observable
double currentPage;
@computed
String get address => wallet.address;
@computed
SyncStatus get status => wallet.syncStatus;
@computed
String get syncStatusText {
var statusText = '';
if (status is SyncingSyncStatus) {
statusText = S.current
.Blocks_remaining(
status.toString());
}
if (status is FailedSyncStatus) {
statusText = S
.current
.please_try_to_connect_to_another_node;
}
return statusText;
}
@computed
WalletBalace get balance {
final wallet = this.wallet;