Skip to content
pubscout

seo

0.0.10, released 2 years ago by an unverified publisher

Flutter package for enabling SEO (meta, body tag) support on Web.

WASM-ready
$ flutter pub add seo
Source repository

What it does

It listens to widget tree changes and converts specialized widgets like Seo.text, Seo.image, Seo.link, and Seo.head into an HTML document tree on the web. This helps search engines index Flutter web applications properly.

AI-written summary of version 0.0.10, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter Web application and need search engine optimization.
  • You want to render meta tags, headers, links, and text into the underlying HTML DOM from Flutter widgets.

Skip it when

  • You need server-side rendering for Open Graph and Twitter Card tags out of the box (requires custom SSR implementation).
  • You are targeting non-web platforms primarily.

Strengths

  • Enables proper SEO indexing for Flutter Web apps
  • Supports multiple HTML elements including meta tags, images, text tags (h1-h6), and links
  • Includes production-ready WidgetTree traversal implementation

Weaknesses

  • Open Graph and Twitter Card tags do not work dynamically without server-side rendering setup
  • SemanticsTree approach is experimental and lacks support for certain tags

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Use usePathUrlStrategy() in main and wrap your app with SeoController.

void main() {
  usePathUrlStrategy();
  runApp(const App());
}

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return SeoController(
      enabled: true,
      tree: WidgetTree(context: context),
      child: MaterialApp(
        home: Scaffold(
          body: Seo.text(
            text: 'Some text',
            child: Text('Some text'),
          ),
        ),
      ),
    );
  }
}

Works with

Packages commonly used together with seo: ones it builds on, ones built on it, and its own family.