Theme is styles an application to make it look appealing, attractive, and suit your tastes or needs.
Flutter’s MaterialApp
comes with a default light blue theme.
Using Custom Theme
//Custom Theme in Flutter
ThemeData(
fontFamily: 'Roboto',
brightness: Brightness.light,
primaryColor: Color(#003c7e),
textTheme: TextTheme( ... ),
headline: TextStyle(fontSize: 36px, ... ),
title: TextStyle(fontSize: 24px, ... ),
body: TextStyle(fontSize: 12px, ... ),
)
Using Theme in Specific Widget
Container(
color: Theme.of(context).primaryColor,
child: Text('custom theme',
style: Theme.of(context).textTheme.body
)
)