meta_seo 3.0.9 copy "meta_seo: ^3.0.9" to clipboard
meta_seo: ^3.0.9 copied to clipboard

Meta SEO is package for adding meta data for html document in head tag which meta tags or meta data make search engine optimization for web apps.

example/lib/main.dart

// Developed by Eng Mouaz M AlShahmeh
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:meta_seo/meta_seo.dart';

void main() {
  // It is required to add the following to run the meta_seo package correctly
  // before the running of the Flutter app
  if (kIsWeb) {
    MetaSEO().config();
  }
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Meta SEO Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // Add MetaSEO just into Web platform condition
    if (kIsWeb) {
      // Define MetaSEO object
      MetaSEO meta = MetaSEO();
      // Add meta seo data for web app as you want
      meta.author(author: 'Eng Mouaz M AlShahmeh');
      meta.description(description: 'Meta SEO Web Example');
      meta.keywords(keywords: 'Flutter, Dart, SEO, Meta, Web');
    }

    return const Scaffold(
      body: Center(child: Text('Meta SEO Web Example')),
    );
  }
}
111
likes
140
pub points
97%
popularity
screenshot

Publisher

unverified uploader

Meta SEO is package for adding meta data for html document in head tag which meta tags or meta data make search engine optimization for web apps.

Repository (GitHub)
View/report issues

Topics

#meta-seo #seo

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on meta_seo