WebsiteSchema class

Schema.org WebSite structured data.

Tells Google about your site and enables sitelinks search box.

WebsiteSchema(
  name: 'My App',
  url: 'https://myapp.com',
  enableSiteSearch: true,
  searchUrlTemplate: 'https://myapp.com/search?q={search_term_string}',
)

See: https://schema.org/WebSite

Inheritance

Constructors

WebsiteSchema({required String name, required String url, String? description, String? alternateName, bool enableSiteSearch = false, String? searchUrlTemplate, String? inLanguage})
const

Properties

alternateName String?
final
description String?
final
enableSiteSearch bool
final
hashCode int
The hash code for this object.
no setterinherited
inLanguage String?
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchUrlTemplate String?
final
url String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonLd() String
Convert to a complete JSON-LD string with @context.
inherited
toJsonLdMinified() String
Convert to a minified JSON-LD string (no extra whitespace).
inherited
toMap() Map<String, dynamic>
Convert this schema to a map (without @context). Subclasses must implement this.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited