Created
May 5, 2023 03:57
-
-
Save MelbourneDeveloper/57b9f78da95614eef4b1d922ea2f6593 to your computer and use it in GitHub Desktop.
Typography
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() => runApp( | |
| MaterialApp( | |
| theme: ThemeData( | |
| fontFamily: 'Roboto', | |
| useMaterial3: true, | |
| textTheme: const TextTheme( | |
| bodyMedium: TextStyle( | |
| color: Colors.red, | |
| fontSize: 30, | |
| fontWeight: FontWeight.bold, | |
| ), | |
| bodySmall: TextStyle( | |
| color: Colors.purple, | |
| fontSize: 10, | |
| ), | |
| ), | |
| ), | |
| debugShowCheckedModeBanner: false, | |
| home: Builder( | |
| builder: (context) => Scaffold( | |
| body: Center( | |
| child: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, | |
| children: [ | |
| const Text('Default Text Style'), | |
| Text('Body Small', | |
| style: Theme.of(context).textTheme.bodySmall), | |
| ], | |
| ), | |
| ), | |
| ), | |
| ), | |
| ), | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment