Closed atharvabhagwat007 closed 2 weeks ago
Got any update on this? I have a similar issue with GoRouter
any update or workaround on this?
Solution - you must add the navigator observer to your router config Example for auto_route:
router.config(
navigatorObservers: () => [
ChuckerFlutter.navigatorObserver,
],
);
Describe the bug I am using auto route and Flutter Chucker navigator observer together. I am getting above issue. Following is my code part of './main.dart';
class App extends StatelessWidget { const App({super.key});
static final AppRouter appRouter = AppRouter( authenticationRouteGuard: AuthenticationRouteGuard(), );
// This widget is the root of your application. @override Widget build(final BuildContext context) => MaterialApp.router( title: 'title', debugShowCheckedModeBanner: false, routerDelegate: appRouter.delegate( navigatorObservers: () => [ ChuckerFlutter.navigatorObserver, MyObserver(), AutoRouteObserver(), ], ), routeInformationParser: appRouter.defaultRouteParser(), builder: ( final BuildContext context, final Widget? widget, ) => StreamChat( client: (Injector.resolve() as ChatClient).client,
child: widget,
),
);
}