appBarTheme method
The theme used to style the AppBar.
By default, a white theme is used.
See also:
- AppBar.backgroundColor, which is set to ThemeData.primaryColor.
- AppBar.iconTheme, which is set to ThemeData.primaryIconTheme.
- AppBar.textTheme, which is set to ThemeData.primaryTextTheme.
- AppBar.brightness, which is set to ThemeData.primaryColorBrightness.
Implementation
ThemeData appBarTheme(BuildContext context) {
assert(context != null);
final ThemeData theme = Theme.of(context);
assert(theme != null);
return theme.copyWith(
primaryColor: Colors.white,
primaryIconTheme: theme.primaryIconTheme.copyWith(color: Colors.grey),
primaryColorBrightness: Brightness.light,
primaryTextTheme: theme.textTheme,
);
}