- Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
- Replaces deprecated collection method usage.
- Fixed
PopScope, andWillPopScopwas not handled properly in the Root routes.
- Allows going to a path relatively by prefixing
./
- Adds preload support to StatefulShellRoute, configurable via
preloadparameter on StatefulShellBranch.
- Adds
missing_code_block_language_in_doc_commentlint.
- Adds current state getter on
GoRouterthat returns the currentGoRouterState.
- Adds missing implementation for the routerNeglect parameter in GoRouter.
- Relaxes route path requirements. Both root and child routes can now start with or without '/'.
- Updated custom_stateful_shell_route example to better support swiping in TabView as well as demonstration of the use of PageView.
- Fixes issue so that the parseRouteInformationWithContext can handle non-http Uris.
- Fixes replace and pushReplacement uri when only one route match in current route match list.
- Fixes an issue where android back button pops pages in the wrong order.
- Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
- Fix GoRouter configuration in
upgrading.md
- Fixes redirect example's signature in
route.dart.
- Adds section for "Stateful nested navigation" to configuration.md.
- Makes GoRouterState lookup more robust.
- Added proper
redirecthandling forShellRoute.$routeandStatefulShellRoute.$routefor proper redirection handling in case of code generation.
- Fixes a URL in
navigation.md.
- Improves the logging of routes when
debugLogDiagnosticsis enabled or `debugKnownRoutes() is called. Explains the position of shell routes in the route tree. Prints the widget name of the routes it is building.
- Fixes issue that path parameters are not set when using the
goBranch.
- Fixes correctness of the state provided in the
onExit.
- Adds route redirect to ShellRoutes
- Fixes unwanted logs when
hierarchicalLoggingEnabledwas set totrue.
- Updates the redirection documentation for clarity
- BREAKING CHANGE
GoRouteData'sonExitnow takes 2 parametersBuildContext context, GoRouterState state.
- Updates examples to use uri.path instead of uri.toString() for accessing the current location.
- Fixes an issue where deep links without path caused an exception
- Fixes restoreRouteInformation issue when GoRouter.optionURLReflectsImperativeAPIs is true and the last match is ShellRouteMatch
- Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
- Fixes memory leaks.
- Exposes full
UrionGoRouterStateinGoRouterRedirect
- Adds
topRoutetoGoRouterState - Adds
lastOrNulltoRouteMatchList
- Fixes new lint warnings.
- Refactors
RouteMatchListand imperative APIs. - BREAKING CHANGE:
- RouteMatchList structure changed.
- Matching logic updated.
- Fixes a typo in
navigation.md.
- Fixes an incorrect use of
extendsfor Dart 3 compatibility. - Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
- Retains query parameters during refresh and first redirect.
- Adds an ability to add a custom codec for serializing/deserializing extra.
- Fixes crashes when dynamically updates routing tables with named routes.
- Fixes the problem that pathParameters is null in redirect when the Router is recreated.
- Fixes deep-link with no path on cold start.
- Adds ability to dynamically update routing table.
- BREAKING CHANGE:
- The function signature of constructor of
RouteConfigurationis updated. - Adds a required
matchedPathnamed parameter toRouteMatch.match.
- The function signature of constructor of
- Fixes missing parameters in the type-safe routes topic documentation.
- Fixes missing state.extra in onException().
- Fixes a bug where the known routes and initial route were logged even when
debugLogDiagnosticswas set tofalse.
- Fixes a missing
{@end-tool}doc directive tag forGoRoute.name.
- Adds optional parameter
overridePlatformDefaultLocationto override initial route set by platform.
- Fixes the Android back button ignores top level route's onExit.
- Fixes the GoRouter.goBranch so that it doesn't reset extra to null if extra is not serializable.
- BREAKING CHANGE:
- Updates the function signature of
GoRouteInformationProvider.restore. - Adds
NavigationType.restoretoNavigationTypeenum.
- Updates the function signature of
- Adds
onExitto GoRoute.
- Fixes RouteInformationParser that does not restore full RouteMatchList if the optionURLReflectsImperativeAPIs is set.
- Fixes an issue in the documentation that was using
state.queryParametersinstead ofstate.uri.queryParameters.
- Adds pub topics to package metadata.
- Fixes mapping from
PagetoRouteMatchs. - Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
- Supports setting
requestFocus.
- BREAKING CHANGE:
- Replaces location, queryParameters, and queryParametersAll in GoRouterState with Uri.
- See Migrating to 10.0.0 or
run
dart fix --applyto fix the breakages.
- Fixes a link in error handling documentation.
- Adds the parentNavigatorKey parameter to ShellRouteData and StatefulShellRouteData.
- Fixes a typo in docs for
StatefulShellRoute.indexedStack(...). - Cleans some typos in the documentation and asserts.
- Adds helpers for go_router_builder for StatefulShellRoute support
- Exposes package-level privates.
- Allows redirect only GoRoute to be part of RouteMatchList.
- BREAKING CHANGE:
- Removes GoRouter.location. Use GoRouterState.of().location instead.
- GoRouter does not
extendsChangeNotifier. - Migration guide
- Reduces excessive rebuilds due to inherited look up.
- Adds onException to GoRouter constructor.
- Adds parent navigator key to ShellRoute and StatefulShellRoute.
- Fixes a bug that GoRouterState in top level redirect doesn't contain complete data.
- Updates documentations around
GoRouter.of,GoRouter.maybeOf, andBuildContextextension.
- Makes namedLocation and route name related APIs case sensitive.
- Fixes a bug in
debugLogDiagnosticsto support StatefulShellRoute.
- Fixes a link for an example in
pathdocumentation. documentation.
- BREAKING CHANGE:
- Imperatively pushed GoRoute no longer change URL.
- Browser backward and forward button respects imperative route operations.
- Refactors the route parsing pipeline.
- Removes obsolete null checks on non-nullable values.
- Introduces
StatefulShellRouteto support using separate navigators for child routes as well as preserving state in each navigation tree (flutter/flutter#99124). - Updates documentation for
pageBuilderandbuilderfields ofShellRoute, to more correctly describe the meaning of the child argument in the builder functions. - Adds support for restorationId to ShellRoute (and StatefulShellRoute).
- Fixes
BuildContextextension methodreplaceNamedto correctly passpathParametersandqueryParameters.
- Adds a workaround for the
dart fix --applyissue, dart-lang/sdk#52233.
- BREAKING CHANGE:
- For the below changes, run
dart fix --applyto automatically migrate your code.GoRouteState.sublochas been renamed toGoRouteState.matchedLocation.GoRouteState.paramshas been renamed toGoRouteState.pathParameters.GoRouteState.fullpathhas been renamed toGoRouteState.fullPath.GoRouteState.queryParamshas been renamed toGoRouteState.queryParameters.paramsandqueryParamsinGoRouteState.namedLocationhave been renamed topathParametersandqueryParameters.paramsandqueryParamsinGoRouter'snamedLocation,pushNamed,pushReplacementNamedreplaceNamedhave been renamed topathParametersandqueryParameters.
- For the below changes, please follow the migration guide.
paramsandqueryParamsinBuildContext'snamedLocation,pushNamed,pushReplacementNamedreplaceNamedhave been renamed topathParametersandqueryParameters.
- For the below changes, run
- Cleans up API and makes RouteMatchList immutable.
- Removes navigator keys from
GoRouteDataandShellRouteData.
- Adds name parameter to
TypedGoRoute
- Fixes a bug that go_router would crash if
GoRoute.pageBuilderdepends onInheritedWidgets.
- Fixes an issue where ShellRoute routes were not logged when debugLogDiagnostic was enabled.
- Fixes an issue when popping pageless route would accidentally complete imperative page.
- Removes navigator keys from
TypedGoRouteandTypedShellRoute.
- Fixes redirect being called with an empty location for unknown routes.
- NoTransitionPage now has an instant reverse transition.
- Fixes an issue where the params are removed after popping.
- Supports returning values on pop.
- Adds
initialExtrato GoRouter to pass extra data alongsideinitialRoute.
- Adds
replacemethod to that replaces the current route with a new one and keeps the same page key. This is useful for when you want to update the query params without changing the page key (#115902).
- Aligns Dart and Flutter SDK constraints.
- Updates compileSdkVersion to 33.
- Updates example app to iOS 11.
- Adds
navigatorKeytoTypedShellRoute - Adds
parentNavigatorKeytoTypedGoRoute - Updates documentation in matching methods.
- Exports supertypes in route_data.dart library.
- Adds
GoRouter.maybeOfto get the closestGoRouterfrom the context, if there is any.
- Adds helpers for go_router_builder for ShellRoute support
- Fixes deprecation message for
GoRouterState.namedLocation
- Adds support for Iterables, Lists and Sets in query params for TypedGoRoute. #108437.
- Add observers parameter to the ShellRoute that will be passed to the nested Navigator.
- Use
HeroControllerScopefor nested Navigator that fixes Hero Widgets not animating in Nested Navigator.
- Adds
reverseTransitionDurationtoCustomTransitionPage
- Fixes unnecessary_null_comparison lint warnings.
- Fixes redirection info log.
- Makes
CustomTransitionPage.barrierDismissiblework
- Fixes missing result on pop in go_router extension.
- Fixes crashes when popping navigators manually.
- Fixes trailing slashes after pops.
- BREAKING CHANGE
GoRouteData'sredirectnow takes 2 parametersBuildContext context, GoRouterState state.GoRouteData'sbuildnow takes 2 parametersBuildContext context, GoRouterState state.GoRouteData'sbuildPageWithStatehas been removed and replaced bybuildPagewith now takes 2 parametersBuildContext context, GoRouterState state.replacefromGoRouter,GoRouterDelegateandGoRouterHelperhas been renamed intopushReplacement.replaceNamedfromGoRouter,GoRouterDelegateandGoRouterHelperhas been renamed intopushReplacementNamed.- go_router v6 migration guide
- Fixes crashes when using async redirect.
- Fixes link for router configuration and sub-routes
- Fixes
popandpushto update urls correctly.
- Refactors
GoRouter.popto be able to pop individual pageless route with result.
- Fixes
GoRouterState.locationandGoRouterState.paramto return correct value. - Cleans up
RouteMatchandRouteMatchListAPI.
- Fixes link of ShellRoute in README.
- Fixes broken links in documentation.
- Fixes a bug with
replacewhere it was not generated a newpageKey.
- Adds documentation using dartdoc topics.
- Fixes crashes when multiple
GoRoutes use the sameparentNavigatorKeyin a route subtree.
- Adds migration guide for 5.1.2 to readme.
- Fixes the documentation by removing the
ShellRoute's non-existingpathparameter from it.
- Allows redirection to return same location.
- Adds GoRouterState to context.
- Fixes GoRouter notification.
- Updates README.
- Removes dynamic calls in examples.
- BREAKING CHANGE
- Remove NavigatorObserver mixin from GoRouter
- Removes DebugGoRouteInformation.
- Removes urlPathStrategy completely, which should have been done in v5.0.0 but some code remained mistakenly.
- Fixes issue where asserts in popRoute were preventing the app from exiting on Android.
- Fixes a bug in ShellRoute example where NavigationBar might lose current index in a nested routes.
- Changes examples to use the routerConfig API
- Fixes missing code example in ShellRoute documentation.
- Allows ShellRoute to have child ShellRoutes (flutter/flutter#111981)
- Fixes a bug where intermediate route redirect methods are not called.
- GoRouter implements the RouterConfig interface, allowing you to call MaterialApp.router(routerConfig: _myGoRouter) instead of passing the RouterDelegate, RouteInformationParser, and RouteInformationProvider fields.
- BREAKING CHANGE
- Redesigns redirection API, adds asynchronous feature, and adds build context to redirect.
- Removes GoRouterRefreshStream
- Removes navigatorBuilder
- Removes urlPathStrategy
- go_router v5 migration guide
- Fixes an issue where GoRoutes with only a redirect were disallowed (flutter/flutter#111763)
- Adds ShellRoute for nested navigation support (flutter/flutter#99126)
- Adds
parentNavigatorKeyto GoRoute, which specifies the Navigator to place that route's Page onto.
- Fix an issue where disabling logging clears the root logger's listeners
- Adds
buildPageWithStatetoGoRouteData. GoRouteData.buildPageis now deprecated in favor ofGoRouteData.buildPageWithState.
- Allows
Map<String, dynamic>maps asqueryParamsofgoNamed,replacedName,pushNamedandnamedLocation.
- Updates text theme parameters to avoid deprecation issues.
- Fixes lint warnings.
- Fixes namedLocation to return URIs without trailing question marks if there are no query parameters.
- Cleans up examples.
- Updates README.
- Fixes rendering issues in the README.
- Fixes a bug where calling extra parameter is always null in route level redirect callback
- Rewrites Readme and examples.
- Fixes a bug where the ValueKey to be the same when a page was pushed multiple times.
- Fixes a bug where go_router_builder wasn't detecting annotations.
- Refactors internal classes and methods
- Adds
void replace()andreplaceNamedtoGoRouterDelegate,GoRouterandGoRouterHelper.
- Fixes a bug where calling namedLocation does not support case-insensitive way.
- Adds
bool canPop()toGoRouterDelegate,GoRouterandGoRouterHelper.
- Adds missed popping log.
- Fixes a bug where initialLocation took precedence over deep-links
- Fixes a bug where calling setLogging(false) does not clear listeners.
- Refactors go_router and introduces
GoRouteInformationProvider. Migration Doc - Fixes a bug where top-level routes are skipped if another contains child routes.
- Uses first match if there are more than one route to match. [ #99833
- Adds
GoRouteDataandTypedGoRouteto supportpackage:go_router_builder.
- Refactors runtime checks to assertions.
- Exports inherited_go_router.dart file.
- Add
dispatchNotificationmethod toDummyBuildContextin tests. (This should be revisited when Flutter2.11.0becomes stable.) - Improves code coverage.
GoRoutenow warns about requiring eitherpageBuilder,builderorredirectat instantiation.
- Updates code for stricter analysis options.
- Fixes a bug where params disappear when pushing a nested route.
- Moves source to flutter/packages.
- Removes all_lint_rules_community and path_to_regexp dependencies.
- pass along the error to the
navigatorBuilderto allow for different implementations based on the presence of an error
- breaking change: added
GoRouterStatetonavigatorBuilderfunction - breaking change: removed
BuildContextfromGoRouter.pop()to remove the need to usecontextparameter when calling theGoRouterAPI; this changes the behavior ofGoRouter.pop()to only pop what's on theGoRouterpage stack and no longer callsNavigator.pop() - new Migrating to 3.0 section in the docs to describe the details of the breaking changes and how to update your code
- added a new shared
scaffold
sample to show how to use the
navigatorBuilderfunction to build a custom shared scaffold outside of the animations provided by go_router
- PR 262: add support for
Router.neglect; thanks to nullrocket! - PR 265: add Japanese translation of the docs; thanks to toshi-kuji! Unfortunately I don't yet know how to properly display them via docs.page, but I'm working on it
- updated the examples using the
fromquery parameter to be completely self-contained in theredirectfunction, simplifying usage - updated the async data example to be simpler
- added a new example to show how to implement a loading page
- renamed the navigator_integration example to user_input and added an example
of
WillPopScopefor go_router apps
- PR 259: remove a hack for notifying the router of a route change that was no longer needed; thanks to nullrocket!
- improved async example to handle the case that the data has been returned but
the page is no longer there by checking the
mountedproperty of the screen
- updated implementation to use logging package for debug diagnostics; thanks to johnpryan
- fixed up the
GoRouterRefreshStreamimplementation with an export, an example and some docs
- added
GoRouterRefreshStreamfrom jopmiddelkamp to easily map from aStreamto aListenablefor use withrefreshListenable; very useful when combined with stream-based state management like flutter_bloc - dartdocs fixups from mehade369
- example link fixes from ben-milanko
- pass additional information to the
NavigatorObservervia default args toMaterialPage, etc.
- fix 205: hack around a
failed assertion in Flutter when using
Duration.zeroin theNoTransitionPage
- provide default implementation of
GoRoute.pageBuilderto provide a simpler way to build pages via theGoRouter.buildmethod - provide default implementation of
GoRouter.errorPageBuilderto provide a simpler way to build error pages via theGoRouter.errorBuildermethod - provide default implementation of
GoRouter.errorBuilderto provide an error page without the need to implement a custom error page builder - new Migrating to 2.5 section in
the docs to show how to take advantage of the new
builderand default error page builder - removed
launch.jsonas VSCode-centric and unnecessary for discovery or easy launching - added a new custom error screen sample
- added a new WidgetsApp sample
- added a new
NoTransitionPageclass - updated docs to explain why the browser's Back button doesn't work
with the
extraparam - updated README to point to new docs site: gorouter.dev
- fix 191: handle several
kinds of trailing / in the location, e.g.
/foo/should be the same as/foo
- fix a misleading error message when using redirect functions with sub-routes
- fix 182: fixes a regression in the nested navigation caused by the fix for #163; thanks to lulupointu for the fix!
- reformatted CHANGELOG file; lets see if pub.dev is still ok with it...
- staged an in-progress doc site at https://docs.page/csells/go_router
- tightened up a test that was silently failing
- fixed a bug that dropped parent params in sub-route redirects
- fix 163: avoids unnecessary page rebuilds
- fix 139: avoids unnecessary page flashes on deep linking
- fix 158: shows exception info in the debug output even during a top-level redirect coded w/ an anonymous function, i.e. what the samples all use
- fix 151: exposes
Navigator.pop()viaGoRouter.pop()to make it easy to find
- fix 127: updated the docs to add a video overview of the project for people that prefer that media style over long-form text when approaching a new topic
- fix 108: updated the
description of the
stateparameter to clarfy that not all properties will be set at every usage
- fix 120 again: found the bug in my tests that was masking the real bug; changed two characters to implement the actual fix (sigh)
- fix 116: work-around for
auto-import of the
context.gofamily of extension methods
- fix 132: route names are stored as case insensitive and are now matched in a case insensitive manner
- fix 120: encoding and decoding of params and query params
- fix 114: give a better error
message when the
GoRouterisn't found in the widget tree viaGoRouter.of(context); thanks aoatmon for the excellent bug report!
- added a new
navigatorBuilderargument to theGoRouterconstructor; thanks to andyduke! - also from andyduke is an update to improve state restoration
- refactor from kevmoo for easier maintenance
- added a new Navigator Integration section of the docs
- fix 61 again: enable images and file links to work on pub.dev/documentation
- fix 62 re-tested; fixed w/ earlier Android system Back button fix (using navigation key)
- fix 91: fix a regression w/
the
errorPageBuilder - fix 92: fix an edge case w/ named sub-routes
- fix 89: enable queryParams
and extra object param w/
push - refactored tests for greater coverage and fewer methods
@visibleForTesting
- fix 86: add
nametoGoRouterStateto complete support for URI-free navigation knowledge in your code - fix 83: fix for
nullextraobject
- fix 80: adding a redirect limit to catch too many redirects error
- fix 81: allow an
extraobject to pass through for navigation
- add badges to the README and codecov to the GitHub commit action; thanks to rydmike for both
- BREAKING CHANGE and fix #50:
split
paramsintoparamsandqueryParams; see the Migrating to 2.0 section of the docs for instructions on how to migrate your code from 1.x to 2.0 - fix 69: exposed named location lookup for redirection
- fix 57: enable the Android
system Back button to behave exactly like the
AppBarBack button; thanks to SunlightBro for the one-line fix that I had no idea about until he pointed it out - fix 59: add query params to top-level redirect
- fix 44: show how to use the
AutomaticKeepAliveClientMixinwith nested navigation to keep widget state between navigations; thanks to rydmike for this update
- enable case-insensitive path matching while still preserving path and query parameter cases
- change a lifetime of habit to sort constructors first as per sort_constructors_first. Thanks for the PR, Abhishek01039!
- set the initial transition example route to
/noneto make pushing the 'fade transition' button on the first run through more fun - fixed an error in the async data example
- Thanks, Mikes!
- updated dartdocs from rydmike
- also shoutout to https://github.com/Salakar for the CI action on GitHub
- this is turning into a real community effort...
- now showing routing exceptions in the debug log
- updated the docs to make it clear that it will be called until it returns
null
- added support
NavigatorObserverobjects to receive change notifications
- docs updates based on user feedback for clarity
- fix for setting URL path strategy in
main() - fix for
push()disablesAppBarBack button
- updated version for initial release
- some renaming for clarify and consistency with transitions
GoRoute.builder=>GoRoute.pageBuilderGoRoute.error=>GoRoute.errorPageBuilder
- added diagnostic logging for
pushandpushNamed
- added support for
pushas well asgo - added 'none' to transitions example app
- updated animation example to use no transition and added an animated gif to the docs
- added support for custom transitions between routes
- updated API docs
- updated docs for
GoRouterState
- updated API docs
- updated named route lookup to O(1)
- updated diagnostics output to show known named routes
- updated diagnostics output to show named route lookup
- docs updates
- added support for named routes
- fix to make
GoRouternotify on pop
- made
GoRouteraChangeNotifierso you can listen forlocationchanges
- books sample bug fix
- added Cupertino sample
- added example of async data lookup
- added state restoration sample
- changed
debugOutputFullPathstodebugLogDiagnosticsand added add'l debugging logging - parameterized redirect
- updated docs for
Linkwidget support
- added Books sample; fixed some issues it revealed
- breaking build to refactor the API for simplicity and capability
- move to fixed routing from conditional routing; simplies API, allows for redirection at the route level and there scenario was sketchy anyway
- add redirection at the route level
- replace guard objects w/ redirect functions
- add
refreshmethod andrefreshListener - removed
.builderctor fromGoRouter(not reasonable to implement) - add Dynamic linking section to the docs
- replaced Books sample with Nested Navigation sample
- add ability to dump the known full paths to your routes to debug output
- update to pageKey to take sub-routes into account
- BREAK: rename
patterntopathfor consistency w/ other routers in the world - added the
GoRouterLoginGuardfor the common redirect-to-login-page pattern
- fixed issue showing home page for a second before redirecting (if needed)
- added
GoRouterState.pageKey - removed
cupertino_iconsfrom mainpubspec.yaml
- refactor to support sub-routes to build a stack of pages instead of matching multiple routes
- added unit tests for building the stack of pages
- some renaming of the types, e.g.
Four04PageandFamiliesPagetoErrorPageandHomePagerespectively - fix a redirection error shown in the debug output
- add
urlPathStrategyargument toGoRouterctor
- docs and description updates
- moved redirect to top-level instead of per route for simplicity
- fixed CHANGELOG formatting
- bundled various useful route handling variables into the
GoRouterStatefor use when building pages and error pages - updated URL Strategy section of docs to reference
flutter run
- formatting update to appease the pub.dev gods...
- updated the CHANGELOG
- moved redirection into a
GoRoutector arg - forgot to update the CHANGELOG
- move outstanding issues to issue tracker
- added explanation of Deep Linking to docs
- reformatting to meet pub.dev scoring guidelines
- docs updates
- messing with the CHANGELOG formatting
- initial useful release
- added support for declarative routes via
GoRouteinstances - added support for imperative routing via
GoRoute.builder - added support for setting the URL path strategy
- added support for conditional routing
- added support for redirection
- added support for optional query parameters as well as positional parameters in route names
- squatting on the package name (I'm not too proud to admit it)