Set Change Text Font Size in Flutter iOS Android Example

Text widget supports multiple type of styling and one them is TextStyle with fontSize. Font size is used to Set Change Text Font Size in Flutter iOS Android App. fontSize supports double value. The default value of fontSize is 14 logical pixels. When application starts drawing text on screen then the font size multiplied by current textScaleFactor for easier us to read the Text on screen.

Contents in this project Set Change Text Font Size in Flutter iOS Android Example:

1. Import material.dart package in your app’s main.dart file.

2. Call our main MyApp class using void main runApp().

3. Create class named as MyApp. This is our main widget class.

4. Create Widget Build area with Scaffold default widget.

5. Create the SafeArea widget in body section of Scaffold widget with Center widget.

6. Create the Text widget with Style -> Text Style -> fontSize and define font size as 28.

7. Complete source code for main.dart file:

Screenshot:

Set Change Text Font Size in Flutter iOS Android Example

Leave a Reply

Your email address will not be published.