创建
Paragraph包含正确字体的代码点,根据需要设置样式,然后绘制。
final icon = Icons.add;var builder = ui.ParagraphBuilder(ui.ParagraphStyle( fontFamily: icon.fontFamily,)) ..addText(String.fromCharCode(icon.prePoint));var para = builder.build();para.layout(const ui.ParagraphConstraints(width: 60));canvas.drawParagraph(para, const Offset(20, 20));
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)