InlineSpanSemanticsInformation constructor Null safety

const InlineSpanSemanticsInformation(
  1. String text,
  2. {bool isPlaceholder = false,
  3. String? semanticsLabel,
  4. List<StringAttribute> stringAttributes = const <ui.StringAttribute>[],
  5. GestureRecognizer? recognizer}
)

Constructs an object that holds the text and semantics label values of an InlineSpan.

The text parameter must not be null.

Use InlineSpanSemanticsInformation.placeholder instead of directly setting isPlaceholder.

Implementation

const InlineSpanSemanticsInformation(
  this.text, {
  this.isPlaceholder = false,
  this.semanticsLabel,
  this.stringAttributes = const <ui.StringAttribute>[],
  this.recognizer,
}) : assert(text != null),
     assert(isPlaceholder != null),
     assert(isPlaceholder == false || (text == '\uFFFC' && semanticsLabel == null && recognizer == null)),
     requiresOwnNode = isPlaceholder || recognizer != null;