CustomSchema class

Custom JSON-LD schema for types not covered by built-in schemas.

Pass any valid Schema.org data as a map.

CustomSchema(data: {
  '@type': 'SoftwareApplication',
  'name': 'My App',
  'operatingSystem': 'Web',
  'applicationCategory': 'DeveloperApplication',
  'offers': {
    '@type': 'Offer',
    'price': '0',
    'priceCurrency': 'USD',
  },
})
Inheritance

Constructors

CustomSchema({required Map<String, dynamic> data})
const

Properties

data Map<String, dynamic>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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