RichTextEditorController constructor
RichTextEditorController({
- String? text,
- TextDeltas? deltas,
- TextMetadata? metadata,
Constructs an instance of RichTextEditorController with the provided text
and deltas
if text
is not provided, it will be generated from the deltas
.
if delta
is not provided, it will be generated from the text
and metadata
.
metadata
is optional and if not provided, it will be set to defaultMetadata
Implementation
RichTextEditorController({
String? text,
TextDeltas? deltas,
TextMetadata? metadata,
}) : deltas = deltas ??
(text == null
? []
: TextDeltasUtils.deltasFromString(
text,
metadata ?? defaultMetadata,
)),
super(
text: text ?? deltas?.text,
metaData: metadata,
) {
addListener(_internalControllerListener);
}