How do I increase font size in Dart

You can use style property of Text to change some of the property of the Text.

Example:

Text(
    "Your text",
     style: TextStyle(
      fontSize: 20.0,
      color: Colors.red,
      fontWeight: FontWeight.w600,
    ),
  )

It's a good practice to use predefined style for Text which gives you standard fontSize and fontWeight for the Text.

You can use them like this

style: Theme.of(context).textTheme.XYZ

XYZ can be body1, body2, title, subhead, headline etc.


At the beginning this is hard to understand and implement. But once you understand, you will fall in love with the Flutter framework. Here is the solution:

new Text('Hello Macaw',style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),),

After that, format the code. That's it. Let me know if it works.

Tags:

Dart

Flutter