UEditorBlock.text constructor
UEditorBlock.text(
- UBlockType type, {
- String text = "",
- List<
UStyleSpan> ? spans, - TextAlign align = TextAlign.start,
- int indent = 0,
- bool checked = false,
- 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,
);