iamSahdeep / seo_renderer

A Flutter Web Plugin to display Text Widget as Html for SEO purpose
MIT License
114 stars 15 forks source link

RendererScrollListener widget missing #12

Closed rirjkl19 closed 2 years ago

rirjkl19 commented 2 years ago

Hi! First of all thank you for creating this amazing package and could the only solution available for flutter web SEO issue.

I would like to ask on how to implement the RendererScrollListener using the package as it is not readily available upon importing the package.

I did try to create my own by listening to the ScrollController and refreshing on ScrollEnd however this is not a very performant solution. Is it possible to give suggestion if in case the RendererScrollListener is not available? thank you.

iamSahdeep commented 2 years ago

Hi @rirjkl19 Thanks for trying it.

We are surely exporting it to make it available from the main file only. https://github.com/iamSahdeep/seo_renderer/blob/master/lib/seo_renderer.dart

There is working example as well : https://github.com/iamSahdeep/seo_renderer/blob/master/example/lib/examples/scrollable_content.dart

RendererScrollListener(
          child: SingleChildScrollView(
            child: Column(
              children: [
                for (var i = 0; i < 10; i++) ...[
                  TextWidget(),
                  TextWidget(),
                  LinkWidget(),
                  TextWidget(),
                  TextWidget(),
                  ImageWidget(),
                ]
              ],
            ),
          ),
        ),

RenderScrollListener is a Widget, can you share your code so I can help better.

rirjkl19 commented 2 years ago

Hi thank you for the quick reply. I tried recreating a new project and it works like a charm. It seems like my old project's dependency is old (even though its already 0.4.0 ?? probably have issue with my cached package). Anyway thank you again for this package! This is really appreciated and could be a real solution for the flutter SEO problem