ToDo constructor
Main to do 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.
The checked
field define if the To do option is marked as done. By default is false.
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
ToDo({
Text? text,
List<Text> texts: const [],
List<Block> children: const [],
this.checked: false,
@deprecated this.textSeparator: ' ',
}) {
if (text != null) {
this._content.add(text);
}
this._content.addAll(texts);
this._children.addAll(children);
}