79086794

Date: 2024-10-14 15:36:56
Score: 1
Natty:
Report link

I found what I need to modify The two sub-widgets in ShellRoute, FirestRouteData and SecondRouteData should be included in IndexRouteData. Therefore, in use, you should use build function directly instead of buildPage function, like:

class FirstRouteData extends GoRouteData {
  const FirstRouteData();

  // static final GlobalKey<NavigatorState> $parentNavigatorKey = shellKey;
  @override
  Widget build(BuildContext context, GoRouterState state) {
    return const FirstScreen();
  }
}

The problem of Multiple widgets used the same GlobalKey should be caused by buildPage. Let’s see if any friends online have clearer opinions.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ada