Can you change flutter text theme?

Viewed 1350

If the theme is set in main.dart as

return MaterialApp(
  title: 'MY APP',
  theme: ThemeData(
    primarySwatch: Colors.blue,
    fontFamily: 'Cabin',
    textTheme: TextTheme(
      headline1: TextStyle(
        fontFamily: 'Raleway',
        color: Colors.black,
        fontWeight: FontWeight.w600,
        fontSize: 18,
      ),
      subtitle1: TextStyle(
        fontFamily: 'Raleway',
        color: Colors.black54,
        fontWeight: FontWeight.w600,
        fontSize: 16,
      ),
    ),
  ),

and I'm using the theme as

Text('MY STRING',
    style: Theme.of(context).textTheme.subtitle1),

How can I make 'MY STRING' be a different color then the subtitle1 theme color while keeping the other properties of theme data, such as font weight and family and size, etc.?

1 Answers
Related