diff --git a/packages/go_router/lib/src/router.dart b/packages/go_router/lib/src/router.dart index a0f448541142..11f40f505cac 100644 --- a/packages/go_router/lib/src/router.dart +++ b/packages/go_router/lib/src/router.dart @@ -257,6 +257,10 @@ class GoRouter implements RouterConfig { /// The top [GoRouterState], the state of the route that was /// last used in either [GoRouter.go] or [GoRouter.push]. + /// + /// Accessing this property via GoRouter.of(context).state will not + /// cause rebuild if the state has changed, consider using + /// GoRouterState.of(context) instead. GoRouterState? get state => routerDelegate.state; /// Whether the imperative API affects browser URL bar.