diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart index 16a976aac..8a6a22e44 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart @@ -15,8 +15,7 @@ class DesktopDashboardView extends StatefulWidget { } class _DesktopDashboardViewState extends State { - - final page = PageController(); + final page = PageController(); final sideMenu = SideMenuController(); @override void initState() { @@ -26,70 +25,64 @@ class _DesktopDashboardViewState extends State { }); super.initState(); } - + @override Widget build(BuildContext context) { - return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SideMenu( - topItems: [ - SideMenuItem( - iconPath: 'assets/images/wallet_outline.png', - priority: 0, - onTap: (page, _) => sideMenu.changePage(page), - - ), - ], - bottomItems: [ - SideMenuItem( - iconPath: 'assets/images/support_icon.png', - priority: 1, - onTap: (page, _) - => sideMenu.changePage(page), - - ), - SideMenuItem( - iconPath: 'assets/images/settings_outline.png', - priority: 2, - onTap: (page, _) => - sideMenu.changePage(page) - , - ), - ], + SideMenu( + topItems: [ + SideMenuItem( + iconPath: 'assets/images/wallet_outline.png', + priority: 0, + onTap: (page, _) => sideMenu.changePage(page), ), - Expanded( - child: PageView( - controller: page, - physics: NeverScrollableScrollPhysics(), - children: [ - _DashboardPage( - balancePage: widget.balancePage, - ), - Container( - child: Navigator( - initialRoute: Routes.support, - onGenerateRoute: (settings) => Router.createRoute(settings), - onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { - return [ - navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))! - ]; - }, - ), - ), - Navigator( - initialRoute: Routes.desktop_settings_page, - onGenerateRoute: (settings) => Router.createRoute(settings), - onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { - return [ - navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))! - ]; - }, - ), - ], - ), + ], + bottomItems: [ + SideMenuItem( + iconPath: 'assets/images/support_icon.png', + priority: 1, + onTap: (page, _) => sideMenu.changePage(page), ), + SideMenuItem( + iconPath: 'assets/images/settings_outline.png', + priority: 2, + onTap: (page, _) => sideMenu.changePage(page), + ), + ], + ), + Expanded( + child: PageView( + controller: page, + physics: NeverScrollableScrollPhysics(), + children: [ + _DashboardPage( + balancePage: widget.balancePage, + ), + Container( + child: Navigator( + initialRoute: Routes.support, + onGenerateRoute: (settings) => Router.createRoute(settings), + onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { + return [ + navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))! + ]; + }, + ), + ), + Navigator( + initialRoute: Routes.desktop_settings_page, + onGenerateRoute: (settings) => Router.createRoute(settings), + onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { + return [ + navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))! + ]; + }, + ), + ], + ), + ), ], ); } @@ -105,19 +98,17 @@ class _DashboardPage extends StatelessWidget { return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 3, - child: balancePage), - Expanded( - flex: 5, - child: Navigator( - initialRoute: Routes.desktop_actions, - onGenerateRoute: (settings) => Router.createRoute(settings), - onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { - return [navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))!]; - }, + Expanded(flex: 3, child: balancePage), + Expanded( + flex: 5, + child: Navigator( + initialRoute: Routes.desktop_actions, + onGenerateRoute: (settings) => Router.createRoute(settings), + onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { + return [navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))!]; + }, ), - ), + ), ], ); }