What is Flutter Text’s Default Font Size?

Flutter has a Text widget that you can use to display text on your screens. By default, the font size is 14 pixels. However, you can change the font size to any value you want. In this post, we will show you how to change the font size in Flutter Text.

Ways to Change Text Font Size

MaterialApp(
  theme: ThemeData(
    textTheme: TextTheme(
      bodyText1: TextStyle(fontSize: 16.0),
      bodyText2: TextStyle(fontSize: 20.0),
      button: TextStyle(fontSize: 16.0),
    ),
  ),

);
Text(
        'Error! Please try again later!',
        style: TextStyle(fontSize: 18),
      )
Text("Default Text Style",
         style:
            TextStyle(
               color: Colors.black,
               fontSize: Theme.of(context).textTheme.body1.fontSize
            )
      )

Similar Posts

  • Best Flutter Tools

    If you want to get the most out of your experience with this incredible platform then I recommend checking out these awesome tools! Flutter Editors Android Studio Android Studio is an IDE (Integrated Development Environment) for developing a mobile application using Dart/Flutter, Java/Kotlin or C/C++ language on Linux, macOS and Windows operating systems. Visual Studio…

  • Font and Emoji Packages

    font_awesome_flutter The Font Awesome Icon pack is available as Flutter Icons. It adds 1500 additional icons to your app, in addition to the default set of 500. flutter_font_icons As the name suggests, this is a collection of font icons built with Flutter. It includes all fonts from react-native-vector-icons and WeatherIcons. icon_font_generator Convert all icons in…

  • Database and ORM Packages

    postgrest The PostgREST client for Dart is a framework developed by the creator of this library. This library offers an ORM interface to PostgREST. conduit A modern HTTP server application framework with OpenAPI 3.0 integration, ORM, and OAuth2 provider. REST, RPC, or GraphQL services are all possible with this foundation. sqfentity_gen The Flutter SDK provides…

  • Text-to-Speech Packages

    Text-to-speech (TTS) is the process of using software to read aloud text that is displayed on a screen. Text-to-speech programs can convert text into speech, and do so in various ways depending on the user’s familiarity with the system. flutter_tts flutter_tts is a good Text to Speech Flutter plugin available on pub.dev platform. This plugin…

  • Text Packages

    One of the benefits of using Flutter is its rich graphical system, which makes it easy for developers to make their app look great with very little effort. To help you get started, we’ve put together this roundup of some of our favorite packages and libraries for creating beautiful text layouts with Flutter! flutter_typeahead A…