例如,如果我为标题设置 40px(在 adobe XD 设计中),如何将其转换为精确的 flutter 字体大小
因为我无法理解 flutter font-size 属性
最佳答案
Adobe XD 中的 40px 意味着 Flutter 中的 40px。您可以阅读official document 。 flutter 字体大小:
The size of glyphs (in logical pixels) to use when painting the text.
您可能会对 devicePixelRatio 感到困惑。您可以从 here 找到 pt 到 px 的转换.
关于flutter - 如何将PX值转换为flutter字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64440034/