books
This commit is contained in:
@@ -62,6 +62,8 @@ class MenuStore with ChangeNotifier {
|
||||
?.label;
|
||||
|
||||
void selectMenuPath(String path) {
|
||||
|
||||
|
||||
MenuNode root = MenuNode(
|
||||
path: '',
|
||||
label: '',
|
||||
@@ -83,7 +85,7 @@ class MenuStore with ChangeNotifier {
|
||||
}else{
|
||||
_shouldAddHistory = true;
|
||||
}
|
||||
|
||||
print("=====selectMenuPath: ${result.last.path}===============");
|
||||
_state = state.copyWith(
|
||||
activeMenu: result.last.path, expandMenus: expandMenus);
|
||||
}
|
||||
@@ -160,10 +162,10 @@ class MenuStore with ChangeNotifier {
|
||||
|
||||
void select(MenuNode menu) {
|
||||
bool hasHistory = _history.where((e) => e.menuPath==menu.path).isNotEmpty;
|
||||
print("=====select: ${hasHistory}===============");
|
||||
if(hasHistory){
|
||||
_shouldAddHistory = false;
|
||||
selectMenuPath(menu.path);
|
||||
notifyListeners();
|
||||
goRouter.go(menu.path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,15 @@ final RouteBase drawRouters = GoRoute(
|
||||
case '18':
|
||||
child = const P18Page();
|
||||
break;
|
||||
case '19':
|
||||
child = const P19Page();
|
||||
break;
|
||||
case '20':
|
||||
child = const P20Page();
|
||||
break;
|
||||
case '21':
|
||||
child = const P21Page();
|
||||
break;
|
||||
}
|
||||
|
||||
return CustomTransitionPage(
|
||||
|
||||
@@ -117,9 +117,6 @@ class _RouterIndicatorState extends State<RouterIndicator> {
|
||||
if(matches.isEmpty) return const SizedBox();
|
||||
RouteMatch match = _delegate.currentConfiguration.matches.last;
|
||||
|
||||
print(
|
||||
"=========_RouterIndicatorState:build==${match.matchedLocation}========");
|
||||
|
||||
return TolyBreadcrumb(
|
||||
fontSize: 12,
|
||||
items: pathToBreadcrumbItems(context, match.matchedLocation),
|
||||
|
||||
Reference in New Issue
Block a user