What is Flutter Text’s Default Font Size?

There are a lot of different design choices that go into creating an app. One of the most important – but often overlooked – is the font size and type. Different fonts can communicate different things to your users, so it’s important to choose the right one.

The default font size for a Flutter app is 14 logical pixels. This is a good size to use because it is large enough that it is easily readable, but not so large that it takes up too much space on the screen.

Following are a few ways to define the font size:

MaterialApp(
  theme: ThemeData(
    textTheme: const TextTheme(
      bodyText1: TextStyle(fontSize: 18.0),
      bodyText2: TextStyle(fontSize: 20.0),
      button: TextStyle(fontSize: 16.0),
    ),
  ),
  home: Scaffold(
    body: Center(child: Text("Font size is 18")),
  ),
)
Text(
	'Apply font size for individual Text widget',
	style: TextStyle(fontSize: 18),
)

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close