generateStrokeParagraph static method
Implementation
static generateStrokeParagraph(
DanmakuContentItem content, double danmakuWidth, double fontSize) {
final Paint strokePaint = Paint()
..style = PaintingStyle.stroke
..strokeWidth = 2
..color = Colors.black;
final ui.ParagraphBuilder strokeBuilder =
ui.ParagraphBuilder(ui.ParagraphStyle(
textAlign: TextAlign.left,
fontSize: fontSize,
textDirection: TextDirection.ltr,
))
..pushStyle(ui.TextStyle(
foreground: strokePaint,
))
..addText(content.text);
return strokeBuilder.build()
..layout(ui.ParagraphConstraints(width: danmakuWidth));
}