Skip to content

Upgrading go_router 0.4 to 0.5

Breaking0.4.1 → 0.5.2Breaking1New1Other1

BreakingUpgrade verdict

1 breaking change.

  • Redirect handling is now set once for the whole router rather than separately on each route.
1 item needs code or config changes
Breaking1
Moves redirect to the top-level router configuration instead of per-route configuration for simplicity.
redirect

Generated by DepDelta from published Dart source. Not mixed with prose notes.

  • removed: ctor GoRoute.redirectAlways({ required String pattern, required GoRouteRedirectBuilder redirect, })
  • removed: field GoRoute.redirect: final GoRouteRedirectBuilder
  • changed: ctor GoRoute({ required this.pattern, required this.builder, this.redirect = …, }) → ctor GoRoute({ required this.pattern, required this.builder, })
  • changed: ctor GoRouter({ required GoRouterRoutesBuilder routes, required GoRouterPageBuilder error, String initialLocation = …, }) → ctor GoRouter({ required GoRouterRoutesBuilder routes, required GoRouterPageBuilder error, GoRouteRedirectBuilder redirect = …, String initialLocation = …, UrlPathStrategy? urlPathStrategy = …, })
  • changed: ctor GoRouter.builder({ required GoRouterWidgetBuilder builder, String initialLocation = …, }) → ctor GoRouter.builder({ required GoRouterWidgetBuilder builder, String initialLocation = …, UrlPathStrategy? urlPathStrategy, })