mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
[skip ci] reformat desktop dashboard
This commit is contained in:
parent
b1b8193043
commit
48ae156eb8
1 changed files with 62 additions and 71 deletions
|
@ -15,8 +15,7 @@ class DesktopDashboardView extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _DesktopDashboardViewState extends State<DesktopDashboardView> {
|
||||
|
||||
final page = PageController();
|
||||
final page = PageController();
|
||||
final sideMenu = SideMenuController();
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -26,70 +25,64 @@ class _DesktopDashboardViewState extends State<DesktopDashboardView> {
|
|||
});
|
||||
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))!];
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue