mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
Fix bug on sidebar reset
This commit is contained in:
parent
3f03fb0b18
commit
a1abdc849a
2 changed files with 2 additions and 7 deletions
|
@ -49,6 +49,7 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||
final sideMenu = SideMenuController();
|
||||
@override
|
||||
void initState() {
|
||||
SideMenuGlobal.controller = sideMenu;
|
||||
sideMenu.addListener((p0) {
|
||||
page.jumpToPage(p0);
|
||||
});
|
||||
|
@ -73,7 +74,6 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SideMenu(
|
||||
controller: sideMenu,
|
||||
topItems: [
|
||||
SideMenuItem(
|
||||
iconPath: 'assets/images/wallet_outline.png',
|
||||
|
@ -243,7 +243,7 @@ class _DashboardPage extends BasePage {
|
|||
dotHeight: 6.0,
|
||||
dotColor: Theme.of(context).indicatorColor,
|
||||
activeDotColor:
|
||||
Theme.of(context).accentTextTheme!.headline4!.backgroundColor!),
|
||||
Theme.of(context).accentTextTheme.headline4!.backgroundColor!),
|
||||
)),
|
||||
Observer(builder: (_) {
|
||||
return ClipRect(
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_controller.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
@ -6,17 +5,13 @@ class SideMenu extends StatelessWidget {
|
|||
const SideMenu({
|
||||
super.key,
|
||||
required this.topItems,
|
||||
required this.controller,
|
||||
required this.bottomItems,
|
||||
});
|
||||
final List<SideMenuItem> topItems;
|
||||
final List<SideMenuItem> bottomItems;
|
||||
|
||||
final SideMenuController controller;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SideMenuGlobal.controller = controller;
|
||||
return Container(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
width: 76,
|
||||
|
|
Loading…
Reference in a new issue