meta_seo_module

Last updated:

0 purchases

meta_seo_module Image
meta_seo_module Images
Add to Cart

Description:

meta seo module

meta_seo_module #
module for meta_seo package
Installation #

If the juneflow project doesn't exist, please create it by following this guide.
open terminal in the juneflow project root directory, enter the following command.

june add meta_seo_module
copied to clipboard
Usage #
Normal Usage #
@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')),
);
}
copied to clipboard
Usage with GoRouter #
final router = GoRouter(
initialLocation: '/',
routes: <GoRoute>[
GoRoute(
path: '/',
builder: (BuildContext context, GoRouterState state) {
// 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.ogTitle(ogTitle: 'First Screen');
meta.description(description: 'First Screen');
meta.keywords(keywords: 'Flutter, Dart, SEO, Meta, Web');
}

return const FirstScreen();
},
),
GoRoute(
path: '/second_screen',
builder: (BuildContext context, GoRouterState state) {
// 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.ogTitle(ogTitle: 'Second Screen');
meta.description(description: 'Second Screen');
meta.keywords(keywords: 'Flutter, Dart, SEO, Meta, Web');
}

return const SecondScreen();
},
),
],
);
copied to clipboard
Extended Usage #
@override
Widget build(BuildContext context) {

// Add MetaSEO just into Web platform condition
if(kIsWeb) {
// Define MetaSEO object
MetaSEO meta = MetaSEO();
// add meta seo open graph tags as you want
meta.facebookAppID(facebookAppID: 'your_app_id');
meta.ogTitle(ogTitle: 'Example Screen');
meta.ogDescription(ogDescription: 'Example Screen Description');
meta.ogImage(ogImage: 'https://example.com/example.png');

// here you can add any tags does not exist in the package as this
meta.propertyContent(property: 'og:site_name', content: 'example');

// or if you want to add twitter card meta tags just as the following
meta.twitterCard(twitterCard: TwitterCard.summaryLargeImage);
meta.twitterTitle(twitterTitle: 'Example Screen');
meta.twitterDescription(twitterDescription: 'Example Screen Description');
meta.twitterImage(twitterImage: 'https://example.com/example.png');

// here you can add any tags does not exist in the package as this
meta.nameContent(name: 'twitter:site', content: '@mouaz_m_shahmeh');
}

return const Scaffold(
body: Center(child: Text('Extended Meta SEO Web Example')),
);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.