fix(doc): update the use of GoRouter in the guides

This commit is contained in:
Efthymis Sarmpanis
2023-11-02 11:45:07 +02:00
parent 354ae323b2
commit 2de5b3eaa6
@@ -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