SchemaGraph class

Helper to create a graph of multiple schemas in one JSON-LD block.

SchemaGraph(schemas: [
  OrganizationSchema(name: 'My Co'),
  WebsiteSchema(name: 'My Site', url: 'https://...'),
])
Inheritance

Constructors

SchemaGraph({required List<JsonLdSchema> schemas})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemas List<JsonLdSchema>
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