toJsonLd method

  1. @override
Map<String, dynamic> toJsonLd()
override

Serialize SchemaHowToStep to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'HowToStep',
      'aggregateElement': convertToJsonLd(aggregateElement),
      'itemListElement': convertToJsonLd(itemListElement,
          (v) => v is SchemaListItem || v is String || v is SchemaThing),
      'itemListOrder': convertToJsonLd(
          itemListOrder, (v) => v is SchemaItemListOrderType || v is String),
      'numberOfItems': convertToJsonLd(numberOfItems),
      'item': convertToJsonLd(item),
      'nextItem': convertToJsonLd(nextItem),
      'previousItem': convertToJsonLd(previousItem),
    });