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

  • Router and Navigation Packages

    fluro Fluro is a Flutter routing library that provides custom routing capabilities such as wildcards, named parameters, and clear route definitions. beamer The Router and Navigator’s Pages API, aka “Navigator 2.0,” enables you to traverse guarded page stacks and URLs via the Router and Navigator. shelf_router Supports URL parameters, nested routers, and router constructions generated…

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

  • Chart and Graph Packages

    We will go over some of the best Flutter packages that create charts and graphs so that you don’t have to waste time searching them out. graphic Graphic is the perfect Flutter library for anyone looking to visualize data in a clear, concise way. With its easy-to-use charting library, you’ll be able to create stunning…

  • Clipboard Packages

    A clipboard is one of the most important tools for a mobile phone user. A clipboard is a place where you can store information that you need quick access to or from. You can use those items to copy and paste them into a word processor, mail, chat program, or other function. clipboard This is…

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