paragraphs property
RichText
get
paragraphs
displayable widgets
Implementation
RichText get paragraphs {
List<TextSpan> content = [];
for (List<TextSpan> line in _paragraphs) {
for (TextSpan part in line) content.add(part);
if (_paragraphs.indexOf(line) < _paragraphs.length - 1)
content.add(TextSpan(text: "\n"));
}
return RichText(
key: UniqueKey(),
maxLines: maxLines,
text: TextSpan(
children: content,
),
);
}