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

  • Bottom Bar Packages

    convex_bottom_bar The ConvexAppBar is a Flutter package that creates and shows a convex tab in the bottom bar. Theming is supported. persistent_bottom_nav_bar For Flutter, a complete, highly configurable bottom navigation bar that is persistent/static and can be used for any application. It has up to 20 different styles. salomon_bottom_bar Another bottom navigation bar, but this…

  • Packages for HTTP Request

    http An open-source, Future-based HTTP API that is composable and multi-platform. This bundle has a collection of high-level functions and types that make it simple to access HTTP resources. It’s cross-platform, with support for mobile, desktop, and the browser. dio A robust Dart HTTP client with Interceptors, global configuration, FormData, Request Cancellation, File downloading, and…

  • Image Libraries

    octo_image The octo_image is a Flutter image widget that may perform various tasks. Placeholders, error indicators, and image transformers with fading are all supported. A placeholder, a progress indicator, an ImageBuilder, or an error widget is required for the OctoImage widget to display the picture. A placeholder or a progress indication may be used, as…

  • 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…

  • 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…