buildWidget method
Widget?
buildWidget(
- BuildContext context,
- GoRouterState state,
- ShellRouteContext shellRouteContext
override
Attempts to build the Widget representing this shell route.
Returns null if this shell route does not build a Widget, but instead uses a Page to represent itself (see buildPage).
Implementation
@override
Widget? buildWidget(BuildContext context, GoRouterState state,
ShellRouteContext shellRouteContext) {
if (builder != null) {
final Widget navigator = shellRouteContext._buildNavigatorForCurrentRoute(
observers, restorationScopeId);
return builder!(context, state, navigator);
}
return null;
}