- 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)
parentNavigatorKey to GoRoute, which specifies the Navigator to place that route's Page onto.
- Fix an issue where disabling logging clears the root logger's listeners
GoRouteData.buildPage is now deprecated in favor of
Map<String, dynamic> maps as
- 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.
- 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
void replace() and
- Fixes a bug where calling namedLocation does not support case-insensitive way.
bool canPop() to
- 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
TypedGoRoute to support
- Refactors runtime checks to assertions.
- Exports inherited_go_router.dart file.
dispatchNotification method to
DummyBuildContext in tests. (This should be revisited when Flutter
2.11.0 becomes stable.)
- Improves code coverage.
GoRoute now warns about requiring either
redirect at 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
navigatorBuilder to allow for different implementations based on the presence of an error
- breaking change: added
- breaking change: removed
GoRouter.pop() to remove the need to use
context parameter when calling the
GoRouter API; this changes the behavior of
GoRouter.pop() to only pop what's on the
GoRouter page stack and no longer calls
- 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
navigatorBuilder function 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
from query parameter to be completely self-contained in the
redirect function, 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
WillPopScope for 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
mounted property of the screen
- updated implementation to use logging package for debug diagnostics; thanks to johnpryan
- fixed up the
GoRouterRefreshStream implementation with an export, an example and some docs
GoRouterRefreshStream from jopmiddelkamp to easily map from a
Stream to a
Listenable for use with
refreshListenable; 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
NavigatorObserver via default args to
- fix 205: hack around a failed assertion in Flutter when using
Duration.zero in the
- provide default implementation of
GoRoute.pageBuilder to provide a simpler way to build pages via the
- provide default implementation of
GoRouter.errorPageBuilder to provide a simpler way to build error pages via the
- provide default implementation of
GoRouter.errorBuilder to 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
builder and default error page builder
launch.json as VSCode-centric and unnecessary for discovery or easy launching
- added a new custom error screen sample
- added a new WidgetsApp sample
- added a new
- updated docs to explain why the browser‘s Back button doesn’t work with the
- 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
- 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
GoRouter.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
state parameter 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.go family 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 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
- fix 92: fix an edge case w/ named sub-routes
- fix 89: enable queryParams and extra object param w/
- refactored tests for greater coverage and fewer methods
- fix 86: add
GoRouterState to complete support for URI-free navigation knowledge in your code
- fix 83: fix for
- fix 80: adding a redirect limit to catch too many redirects error
- fix 81: allow an
extra object 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
queryParams; 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
AppBar Back 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
AutomaticKeepAliveClientMixin with 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
/none to make pushing the ‘fade transition’ button on the first run through more fun
- fixed an error in the async data example
- now showing routing exceptions in the debug log
- updated the docs to make it clear that it will be called until it returns
- added support
NavigatorObserver objects to receive change notifications
- docs updates based on user feedback for clarity
- fix for setting URL path strategy in
- fix for
AppBar Back button
- updated version for initial release
- some renaming for clarify and consistency with transitions
- added diagnostic logging for
- added support for
push as well as
- 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
- 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
GoRouter notify on pop
ChangeNotifier so you can listen for
- added Cupertino sample
- added example of async data lookup
- added state restoration sample
debugLogDiagnostics and added add'l debugging logging
- parameterized redirect
- updated docs for
Link widget 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
refresh method and
.builder ctor from
GoRouter (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
path for consistency w/ other routers in the world
- added the
GoRouterLoginGuard for the common redirect-to-login-page pattern
- fixed issue showing home page for a second before redirecting (if needed)
cupertino_icons from main
- 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.
- fix a redirection error shown in the debug output
urlPathStrategy argument to
- 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
GoRouterState for use when building pages and error pages
- updated URL Strategy section of docs to reference
- formatting update to appease the pub.dev gods...
- moved redirection into a
GoRoute ctor 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
- messing with the CHANGELOG formatting
- initial useful release
- added support for declarative routes via
- added support for imperative routing via
- 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)