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.titleTextStyle, which is set to ThemeData.primaryTextTheme.
- AppBar.systemOverlayStyle.
Implementation
ThemeData appBarTheme(BuildContext context) {
final ThemeData theme = Theme.of(context);
return theme.copyWith(
primaryColor: Colors.white,
primaryIconTheme: theme.primaryIconTheme.copyWith(color: Colors.grey),
primaryTextTheme: theme.textTheme,
);
}