whenOrNull<TResult extends Object?> method

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  1. TResult? heading1(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  2. TResult? heading2(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  3. TResult? heading3(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  4. TResult? heading4(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  5. TResult? heading5(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  6. TResult? heading6(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  7. TResult? paragraph(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  8. TResult? listItem(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  9. TResult? orderedListItem(
    1. List<Span> spans,
    2. String text,
    3. String type
    )?,
  10. TResult? image(
    1. Dimension dimensions,
    2. String url,
    3. String? alt,
    4. String? copyright,
    )?,
  11. TResult? embed(
    1. EmbedData info,
    2. String type
    )?,
})
inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(List<Span> spans, String text, String type)? heading1,
  TResult? Function(List<Span> spans, String text, String type)? heading2,
  TResult? Function(List<Span> spans, String text, String type)? heading3,
  TResult? Function(List<Span> spans, String text, String type)? heading4,
  TResult? Function(List<Span> spans, String text, String type)? heading5,
  TResult? Function(List<Span> spans, String text, String type)? heading6,
  TResult? Function(List<Span> spans, String text, String type)? paragraph,
  TResult? Function(List<Span> spans, String text, String type)? listItem,
  TResult? Function(List<Span> spans, String text, String type)?
      orderedListItem,
  TResult? Function(
          Dimension dimensions, String url, String? alt, String? copyright)?
      image,
  TResult? Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
      embed,
}) =>
    throw _privateConstructorUsedError;