fiber_router 1.3.8 copy "fiber_router: ^1.3.8" to clipboard
fiber_router: ^1.3.8 copied to clipboard

Typed navigation layer built on go_router declarative view, node, and shell routes with fade transitions and code-generated BuildContext extensions.

Changelog #

1.3.8 #

  • name is now a required parameter on FiberRouteNode.view(), .deeplink(), .shell(), and .controller() (previously optional on all four) — every node must be explicitly named. On view()/.deeplink() it only overrides the getter name generated by fiber_router_gen; it has no effect at runtime, since the actual route is still keyed by the widget type.
  • Fix: FiberRouter.create()'s initialLocation and redirect resolved a target widget's path by snake-casing its runtime type (e.g. DashboardView/dashboard_view), ignoring any custom name given to the controller that widget belongs to (e.g. name: "dashboard" registers /dashboard, not /dashboard_view). This produced a GoException: no routes for location: /dashboard_view whenever a controller's name diverged from its widget type. Controller widget types are now mapped to their actual registered route name and resolved correctly.
  • A controller's real go_router route name/path is no longer just its own name — it's now the full ancestor path (every shell/controller/group name from the root down to it, snake-cased and joined with _), e.g. a "detail" controller nested under "store" nested under "dashboard" registers as /dashboard_store_detail. This guarantees the registered route name is unique by construction, so two unrelated controllers can both be named "detail" without go_router throwing duplication fullpaths for name "detail" at startup. Views/deeplinks are unaffected — their route is still keyed by widget type, not name, which is already unique by construction.
  • Fix: a controller's own entry redirect (used when navigating to a controller with no params) computed its "first leaf" target via _firstLeafName, which returned a nested controller's bare name instead of its ancestor-qualified route name. This caused GoException: no routes for location: /store (or any nested controller) once controller routes became ancestor-qualified, since the redirect pointed at the old unqualified path. _firstLeafName is now ancestor-path-aware and returns the same qualified name that controller actually registers.

1.3.7 #

  • goShellNamed is now generic — Future<T?> goShellNamed<T>(String routeName, {bool replace = false}) — returning the value passed to context.pop(result) when replace is false. Returns null immediately when replace is true (replace navigation cannot carry a result).

1.3.6 #

  • Add replace parameter to goShell ({bool replace = true}) — true uses pushReplacementNamed (default, preserves existing shell behavior), false uses pushNamed for stackable shell navigation.

1.3.5 #

  • Add replace parameter to goShellNamed(routeName, {bool replace = false})replace: true uses pushReplacementNamed (no back navigation), replace: false (default) uses pushNamed (stackable). Only affects controller navigation; goShell for shell routes is unchanged.

1.3.4 #

  • Fix controller shell transition: ShellRoute for controller nodes now uses pageBuilder (returning _routeTransition with the node's transition and gesturePopEnabled) instead of builder, so the transition is applied at the shell level rather than only on the inner redirect GoRoute that was never rendered. This fixes the visible animation when switching between controllers (e.g. store → brands) even when RouteTransition.none was set.

1.3.3 #

  • Add transition and gesturePopEnabled parameters to FiberRouteNode.controller() — controls the page transition and gesture behavior of the controller's entry route. Defaults to RouteTransition.none and gesturePopEnabled: false.

1.3.2 #

  • Fix import

1.3.1 #

  • Make builder optional on FiberRouteNode.controller() — defaults to (context, child) => ControllerView(child: child) when omitted.
  • Add BuildContext.goShellNamed(String routeName) — navigates by explicit route name rather than deriving it from T.toString(), fixing controller navigation when an explicit name override is provided.

1.3.0 #

  • No runtime changes — version bump to stay in sync with fiber_router_gen 1.4.0.

1.2.0 #

  • Add FiberRouteNode.controller<T>() — a hybrid route that acts as both a shell (wraps children with a persistent UI) and a navigable route registered at /<T snake_case>. Navigating to the controller automatically redirects to the first available leaf route.
  • Add optional name parameter to FiberRouteNode.shell() and FiberRouteNode.controller() — overrides the group class name derived from the builder widget type.

1.1.3 #

  • Add RouteTransition.none — uses NoTransitionPage for an instant child swap with no animation duration. Useful for shell routes where transitions cause layout artefacts.

1.1.2 #

  • Fix goShell: replace goNamed with pushReplacementNamed (wrapped in Router.neglect) so shell transitions go through the route's CustomTransitionPage and apply the correct animation. goNamed bypassed the page-level transition, causing a blank frame between views.

1.1.1 #

  • Remove ShellRouter and ShellRouterParams from the library — they are now generated directly in the output file by fiber_router_gen, keeping the library free of generated-only artefacts.

1.1.0 #

  • Add ShellRouter<T> — shell navigation helper without a replace parameter (navigation within a shell always swaps the child, never stacks).
  • Add ShellRouterParams<T, P> — same as ShellRouter but with typed parameters.
  • Add BuildContext.goShell<T, P>() — uses goNamed so the shell child is replaced in-place rather than pushed onto the navigator stack.

1.0.0 #

  • Initial release.
  • FiberRouter.create() — wraps GoRouter with a declarative node-based API.
  • FiberRouteNode.view() — typed view route with optional fade transition.
  • FiberRouteNode.node() — named group for organizing related routes.
  • FiberRouteNode.shell() — shell route that keeps a persistent UI wrapper while inner routes change.
  • FiberRouteNode.deeplink() — deeplink-capable route with query-parameter deserialization.
  • BuildContext.go<T, P>() — type-safe navigation extension.
  • GoRouterState.isOn<T>() — check if the current location matches a route type.
  • NavigatorFadeTransition — fade PageRoute for local Navigator push.
  • @FiberRouterGen() — annotation to mark the router variable for code generation with fiber_router_gen.
1
likes
140
points
79
downloads

Documentation

API reference

Publisher

verified publisherfiberstudio.app

Weekly Downloads

Typed navigation layer built on go_router declarative view, node, and shell routes with fade transitions and code-generated BuildContext extensions.

Repository (GitHub)
View/report issues

Topics

#navigation #router #go-router

License

unknown (license)

Dependencies

change_case, flutter, go_router

More

Packages that depend on fiber_router