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

  • GDPR Packages

    GDPR is coming up, and you’re not sure what to do. The General Data Protection Regulation (GDPR) went into effect in 2018. This new regulation will have a major impact on how companies collect data from European Union citizens. It’s important that your company is compliant with this new law or risk heavy fines of…

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

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

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

  • Color Pickers

    o_color_picker The package includes a simple and fast two-step color picker that lets you select colors or tones. flex_color_picker The primary, accent, and custom color picker are all editable. An optional HSV wheel color picker is also available. flutter_circle_color_picker A lovely flutter color picker that chooses HSL colors. flutter_colorpicker This is a flutter library that…