Children constructor
Children({
- @deprecated Heading? heading,
- @deprecated Paragraph? paragraph,
- @deprecated List<
ToDo> ? toDo,
Main children constructor.
Parameters deprecated: Do not use the parameters, soon will be removed.
Can receive a single heading
, a single paragraph
, and a list of toDo
blocks. If all three are included then the three fields are added to the blocks list adding first the heading
field, then the paragraph
, and the list of toDo
at the end.
Implementation
Children({
@deprecated Heading? heading,
@deprecated Paragraph? paragraph,
@deprecated List<ToDo>? toDo,
}) {
if (heading != null) {
_blocks.add(heading);
}
if (paragraph != null) {
_blocks.add(paragraph);
}
if (toDo != null) {
_blocks.addAll(toDo.toList());
}
}