How to set the SliverAppBar's Title style from the MaterialApp's theme parameter?

687 views Asked by At

If I would like to set the style of a regular appbar title from the MaterialApp theme parameter, I would do the following:

 ThemeData(appBarTheme: const AppBarTheme(
  textTheme: TextTheme(
    headline6: TextStyle(
      color: Colors.red,
      fontWeight: FontWeight.w600,
      fontSize: 37,
    ),
  ),
),

However, I can't seem to figure out how to do the same thing for a SliverAppBar. I am aware that you can simply set the style of the Text widget assigned to the title parameter within the SliverAppBar widget, but I'm trying to see if I can achieve the same result from the app's custom theme instead.

0

There are 0 answers