MenuStore constructor

MenuStore({
  1. List<String> expandMenus = const [],
  2. required String activeMenu,
  3. required MenuNode root,
})

Implementation

MenuStore({
  List<String> expandMenus = const [],
  required String activeMenu,
  required MenuNode root,
}) {
  _state = MenuState(
    expandMenus: expandMenus,
    activeMenu: activeMenu,
    items: root.children,
  );

  _history.add(MenuHistory(
    menuLabel: pathName(activeMenu) ?? activeMenu,
    menuPath: activeMenu,
  ));
  // goRouter.routerDelegate.addListener(_onRouterChange);
}