diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 820e94928..52a4d8f61 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -51,14 +51,25 @@ class DashboardPage extends StatelessWidget { @override Widget build(BuildContext context) { + final screenHeight = MediaQuery.of(context).size.height; return Scaffold( body: Observer( builder: (_) { - final dashboardPageView = _DashboardPageView( - balancePage: balancePage, - bottomSheetService: bottomSheetService, - dashboardViewModel: dashboardViewModel, - addressListViewModel: addressListViewModel, + final dashboardPageView = RefreshIndicator( + displacement: screenHeight * 0.1, + onRefresh: () async => await dashboardViewModel.refreshDashboard(), + child: SingleChildScrollView( + physics: AlwaysScrollableScrollPhysics(), + child: Container( + height: screenHeight, + child: _DashboardPageView( + balancePage: balancePage, + bottomSheetService: bottomSheetService, + dashboardViewModel: dashboardViewModel, + addressListViewModel: addressListViewModel, + ), + ), + ), ); if (DeviceInfo.instance.isDesktop) { diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index ef43ddf40..ef521c311 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -547,4 +547,8 @@ abstract class DashboardViewModelBase with Store { return ServicesResponse([], false, ''); } } + + Future refreshDashboard() async { + reconnect(); + } }