seo 0.0.7 copy "seo: ^0.0.7" to clipboard
seo: ^0.0.7 copied to clipboard

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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:seo/seo.dart';
import 'package:seo_example/main_router.dart';

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

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

  final _router = MainRouter();

  @override
  Widget build(BuildContext context) {
    return SeoController(
      enabled: true,
      tree: WidgetTree(context: context),
      child: MaterialApp.router(
        theme: Theme.of(context).copyWith(
          scaffoldBackgroundColor: const Color(0xFFEEEEEE),
          textTheme: Theme.of(context)
              .textTheme
              .copyWith(
                headlineSmall: const TextStyle(fontWeight: FontWeight.w600),
                titleLarge: const TextStyle(fontWeight: FontWeight.w600),
              )
              .apply(
                displayColor: Colors.black,
                bodyColor: Colors.black,
              ),
        ),
        routerDelegate: _router.delegate(),
        routeInformationParser: _router.defaultRouteParser(),
      ),
    );
  }
}
105
likes
130
pub points
90%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, rxdart

More

Packages that depend on seo