fix(doc): update the use of GoRouter in the guides
This commit is contained in:
@@ -489,8 +489,10 @@ class _MyAppState extends State<MyApp> {
|
|||||||
|
|
||||||
late final _router = GoRouter(
|
late final _router = GoRouter(
|
||||||
initialLocation: '/',
|
initialLocation: '/',
|
||||||
navigatorBuilder: (context, state, child) {
|
routes: [
|
||||||
if (state.location.startsWith('/chat')) {
|
ShellRoute(
|
||||||
|
builder: (context, state, child) {
|
||||||
|
if (state.uri.host.startsWith('/chat')) {
|
||||||
wasPreviousRouteChat = true;
|
wasPreviousRouteChat = true;
|
||||||
return StreamChat(
|
return StreamChat(
|
||||||
client: _client,
|
client: _client,
|
||||||
@@ -536,6 +538,8 @@ class _MyAppState extends State<MyApp> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user