generateParagraph static method
Implementation
static generateParagraph(
DanmakuContentItem content, double danmakuWidth, double fontSize) {
final ui.ParagraphBuilder builder = ui.ParagraphBuilder(ui.ParagraphStyle(
textAlign: TextAlign.left,
fontSize: fontSize,
textDirection: TextDirection.ltr,
))
..pushStyle(ui.TextStyle(
color: content.color,
))
..addText(content.text);
return builder.build()
..layout(ui.ParagraphConstraints(width: danmakuWidth));
}