Skip to content

Instantly share code, notes, and snippets.

@MelbourneDeveloper
Created May 5, 2023 03:57
Show Gist options
  • Select an option

  • Save MelbourneDeveloper/57b9f78da95614eef4b1d922ea2f6593 to your computer and use it in GitHub Desktop.

Select an option

Save MelbourneDeveloper/57b9f78da95614eef4b1d922ea2f6593 to your computer and use it in GitHub Desktop.
Typography
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