mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
Added routing to the sync indicator (#288)
* Added routing to the sync indicator * fixed format * fixed format * resolved issues
This commit is contained in:
parent
12c5ed27dc
commit
d05f392aae
2 changed files with 8 additions and 4 deletions
|
@ -60,7 +60,9 @@ class DashboardPage extends BasePage {
|
|||
|
||||
@override
|
||||
Widget middle(BuildContext context) {
|
||||
return SyncIndicator(dashboardViewModel: walletViewModel);
|
||||
return SyncIndicator(dashboardViewModel: walletViewModel,
|
||||
onTap: () => Navigator.of(context, rootNavigator: true)
|
||||
.pushNamed(Routes.nodeList));
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
||||
import 'package:cake_wallet/core/sync_status_title.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:cw_core/sync_status.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart';
|
||||
|
||||
class SyncIndicator extends StatelessWidget {
|
||||
SyncIndicator({@required this.dashboardViewModel});
|
||||
SyncIndicator({@required this.dashboardViewModel,this.onTap});
|
||||
|
||||
final DashboardViewModel dashboardViewModel;
|
||||
final Function() onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -27,6 +27,8 @@ class SyncIndicator extends StatelessWidget {
|
|||
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
child: GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
height: 30,
|
||||
width: syncIndicatorWidth,
|
||||
|
@ -74,7 +76,7 @@ class SyncIndicator extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue