Flutter sets the theme default text style
If you want to set the default text style in Flutter, how to do it?
You can set a theme, and set the font style we want in the theme. The sample code is as follows:
MaterialApp(
theme: ThemeData(
primaryColor: Colors.white,
textTheme: new TextTheme(
headline6: TextStyle(fontSize: 12.0, color: Colors.green),
bodyText2: TextStyle(fontSize: 12.0, color: Colors.green),
overline: TextStyle(fontSize: 12.0, color: Colors.green),
),
//...
),
)
**PS: For more exciting content, please view --> "Flutter Development"
**PS: For more exciting content, please view --> "Flutter Development"
**PS: For more exciting content, please view --> "Flutter Development"