Styling in Flutter
TextStyle lets you customize text appearance. BoxDecoration adds colors and borders to containers. ThemeData sets your app's colors and styles once in MaterialApp. You can define dark and light themes to support different user preferences.
Text(
'Styled Text',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Colors.red,
),
)
MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
brightness: Brightness.light,
),
darkTheme: ThemeData(
primarySwatch: Colors.blue,
brightness: Brightness.dark,
),
)
Try it Yourself ->