From af41cd5568241574bf3eebf8c6cac82f2bf68cf0 Mon Sep 17 00:00:00 2001 From: cedvdb Date: Sun, 3 Nov 2024 13:29:13 +0100 Subject: [PATCH] add comment --- packages/go_router/lib/src/router.dart | 4 ++++ 1 file changed, 4 insertions(+) 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.