Merge pull request #1763 from GetStream/fix/docs-go-router

fix(doc): update the use of GoRouter in the guides
This commit is contained in:
Deven Joshi
2023-11-03 17:29:14 +05:30
committed by GitHub
@@ -489,8 +489,10 @@ class _MyAppState extends State<MyApp> {
late final _router = GoRouter(
initialLocation: '/',
navigatorBuilder: (context, state, child) {
if (state.location.startsWith('/chat')) {
routes: [
ShellRoute(
builder: (context, state, child) {
if (state.uri.host.startsWith('/chat')) {
wasPreviousRouteChat = true;
return StreamChat(
client: _client,
@@ -536,6 +538,8 @@ class _MyAppState extends State<MyApp> {
],
),
],
),
],
);
@override