Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using seo_renderer with Navigator 2.0 #18

Open
gabmagnan opened this issue Mar 16, 2022 · 5 comments
Open

Using seo_renderer with Navigator 2.0 #18

gabmagnan opened this issue Mar 16, 2022 · 5 comments

Comments

@gabmagnan
Copy link

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

@thisismaca
Copy link

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

@krokyze
Copy link
Collaborator

krokyze commented Mar 20, 2022

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

@ben55j
Copy link

ben55j commented May 19, 2022

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

@sarah-parker
Copy link

sarah-parker commented May 24, 2022

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

@ahmednfwela
Copy link

GoRouter supports passing an observer via its observers property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants