Paragraph constructor
Main paragraph constructor.
Can receive a single text
or a list of texts
. If both are included also both fields are added to the heading content adding first the text
field. Also can receive the children
of the block.
Deprecated: textSeparator
will be removed and the separation will be by your own. This because that's the same way that Text
& RichText
works on Flutter. In this way you can add annotations for a part of a word instead of only full words or phrases.
Also a textSeparator
can be anexed to separate the texts on the json generated using the toJson()
function. The separator is used because when the text is displayed is all together without any kind of separation and adding the separator that behavior is avoided. By default the textSeparator
is an space (" ").
Implementation
Paragraph({
Text? text,
List<Text> texts: const [],
List<Block> children: const [],
@deprecated this.textSeparator: ' ',
}) {
if (text != null) {
this._content.add(text);
}
this._content.addAll(texts);
this._children.addAll(children);
}