How to convert PX value to flutter font size


For example, if I set 40px for the title (in adobe XD design) how to convert it to the exact flutter font size

because I can’t understand the flutter font-size property


40px in Adobe XD means 40px in Flutter. You can read the official document. Flutter font-size:

The size of glyphs (in logical pixels) to use when painting the text.

You can be confused about devicePixelRatio. You can find pt to px conversion from here.

Answered By – Akif

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *