seo_renderer icon indicating copy to clipboard operation
seo_renderer copied to clipboard

Using seo_renderer with Navigator 2.0

Open gabmagnan opened this issue 3 years ago • 5 comments

Hello,

I'm very interesting by your lib, but i cannot implement it if I use Navigator 2.0.

In my main, i'm using MaterialApp.router(, and there is no observers or navigatorObserver key.

Do you have a solution for that ?

Many thanks

gabmagnan avatar Mar 16 '22 09:03 gabmagnan

I have the same problem and haven't been able to find a workaround.

thisismaca avatar Mar 16 '22 18:03 thisismaca

It depends on what kind of router implementation you're using? For example auto_route does support passing navigatorObservers into their routerDelegate https://pub.dev/packages/auto_route#navigation-observers

krokyze avatar Mar 20 '22 11:03 krokyze

Hello, I am having the same issue using the auto_route package. It works, but all texts are always displayed twice with a red font.

Here how I have implemented it :

 return Layout(
     child: RobotDetector(
       debug: true, // you can set true to enable robot mode
       child: MaterialApp.router(
         title: StringConst.APP_NAME,
         theme: AppTheme.lightThemeData,
         debugShowCheckedModeBanner: false,
         routerDelegate: _appRouter.delegate(
           navigatorObservers: ()=> [seoRouteObserver],
         ),
         routeInformationParser: _appRouter.defaultRouteParser(),
       ),
     ),
   );

Do you have an example about how to use the package using auto_route ?

Many thanks ! Benjamin

ben55j avatar May 19 '22 12:05 ben55j

Would also be interested in hearing a resolution, currently using GoRouter

sarah-parker avatar May 24 '22 02:05 sarah-parker

GoRouter supports passing an observer via its observers property

ahmednfwela avatar Nov 07 '22 23:11 ahmednfwela