diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md index bd8f397273a..8767c3d499a 100644 --- a/packages/go_router/CHANGELOG.md +++ b/packages/go_router/CHANGELOG.md @@ -1,5 +1,7 @@ ## NEXT + - Fixes a typo in docs for `StatefulShellRoute.indexedStack(...)`. +- Cleans some typos in the documentation and asserts. ## 9.0.3 diff --git a/packages/go_router/lib/src/configuration.dart b/packages/go_router/lib/src/configuration.dart index a0a9b93c4e2..a4a97594718 100644 --- a/packages/go_router/lib/src/configuration.dart +++ b/packages/go_router/lib/src/configuration.dart @@ -45,7 +45,9 @@ class RouteConfiguration { } } else { if (route.path.startsWith('/') || route.path.endsWith('/')) { - throw GoError('sub-route path may not start or end with /: $route'); + throw GoError( + 'sub-route path may not start or end with "/": $route', + ); } } subRouteIsTopLevel = false; diff --git a/packages/go_router/lib/src/information_provider.dart b/packages/go_router/lib/src/information_provider.dart index e63ddf439f6..31a9e694279 100644 --- a/packages/go_router/lib/src/information_provider.dart +++ b/packages/go_router/lib/src/information_provider.dart @@ -36,9 +36,9 @@ enum NavigatingType { } /// The data class to be stored in [RouteInformation.state] to be used by -/// [GoRouteInformationPrarser]. +/// [GoRouteInformationParser]. /// -/// This state class is used internally in go_router and will not be send to +/// This state class is used internally in go_router and will not be sent to /// the engine. class RouteInformationState { /// Creates an InternalRouteInformationState. @@ -54,8 +54,8 @@ class RouteInformationState { /// The extra object used when navigating with [GoRouter]. final Object? extra; - /// The completer that needs to be complete when the newly added route is - /// popped off the screen.. + /// The completer that needs to be completed when the newly added route is + /// popped off the screen. /// /// This is only null if [type] is [NavigatingType.go]. final Completer? completer; diff --git a/packages/go_router/lib/src/match.dart b/packages/go_router/lib/src/match.dart index e0e98982915..9fef0af95b4 100644 --- a/packages/go_router/lib/src/match.dart +++ b/packages/go_router/lib/src/match.dart @@ -77,7 +77,7 @@ class RouteMatch { /// for example: /// /// uri = '/family/f2/person/p2' - /// route = GoRoute('/family/:id) + /// route = GoRoute('/family/:id') /// /// matchedLocation = '/family/f2' final String matchedLocation; diff --git a/packages/go_router/lib/src/router.dart b/packages/go_router/lib/src/router.dart index 7c061df24ac..8cd3464ba1b 100644 --- a/packages/go_router/lib/src/router.dart +++ b/packages/go_router/lib/src/router.dart @@ -168,7 +168,7 @@ class GoRouter implements RouterConfig { 'top-level path must start with "/": $route'); } else { assert(!route.path.startsWith('/') && !route.path.endsWith('/'), - 'sub-route path may not start or end with /: $route'); + 'sub-route path may not start or end with "/": $route'); } subRouteIsTopLevel = false; } else if (route is ShellRouteBase) { @@ -258,7 +258,7 @@ class GoRouter implements RouterConfig { /// Whether the imperative API affects browser URL bar. /// - /// The Imperative APIs refer to [push], [pushReplacement], or [Replace]. + /// The Imperative APIs refer to [push], [pushReplacement], or [replace]. /// /// If this option is set to true. The URL bar reflects the top-most [GoRoute] /// regardless the [RouteBase]s underneath. @@ -320,7 +320,7 @@ class GoRouter implements RouterConfig { /// Restore the RouteMatchList void restore(RouteMatchList matchList) { - log.info('going to ${matchList.uri}'); + log.info('restoring ${matchList.uri}'); routeInformationProvider.restore( matchList.uri.toString(), encodedMatchList: RouteMatchListCodec(configuration).encode(matchList),