UEditorBlock.text constructor

UEditorBlock.text(
  1. UBlockType type, {
  2. String text = "",
  3. List<UStyleSpan>? spans,
  4. TextAlign align = TextAlign.start,
  5. int indent = 0,
  6. bool checked = false,
  7. String? language,
})

Convenience factory for a text block seeded with text and spans.

Implementation

factory UEditorBlock.text(
  UBlockType type, {
  String text = "",
  List<UStyleSpan>? spans,
  TextAlign align = TextAlign.start,
  int indent = 0,
  bool checked = false,
  String? language,
}) => UEditorBlock(
  type: type,
  controller: URichTextController(text: text, spans: spans),
  focusNode: FocusNode(),
  align: align,
  indent: indent,
  checked: checked,
  language: language,
);