Removed uses of AppBarTheme.color in packages/flutter (#74273)

This commit is contained in:
Hans Muller
2021-01-20 12:19:18 -08:00
committed by GitHub
parent 3b7e3d4b3a
commit c66596e595
5 changed files with 9 additions and 9 deletions

View File

@@ -729,7 +729,7 @@ class _AppBarState extends State<AppBar> {
final Color backgroundColor = backwardsCompatibility
? widget.backgroundColor
?? appBarTheme.color
?? appBarTheme.backgroundColor
?? theme.primaryColor
: widget.backgroundColor
?? appBarTheme.backgroundColor

View File

@@ -43,10 +43,10 @@ class AppBarTheme with Diagnosticable {
this.titleTextStyle,
this.systemOverlayStyle,
this.backwardsCompatibility,
}) : assert(
color == null || backgroundColor == null,
'The color and backgroundColor parameters mean the same thing. Only specify one.'),
backgroundColor = backgroundColor ?? color;
}) : assert(
color == null || backgroundColor == null,
'The color and backgroundColor parameters mean the same thing. Only specify one.'),
backgroundColor = backgroundColor ?? color;
/// This property is obsolete, please use [systemOverlayStyle] instead.
///

View File

@@ -229,7 +229,7 @@ abstract class SearchDelegate<T> {
return theme.copyWith(
appBarTheme: AppBarTheme(
brightness: colorScheme.brightness,
color: colorScheme.brightness == Brightness.dark ? Colors.grey[900] : Colors.white,
backgroundColor: colorScheme.brightness == Brightness.dark ? Colors.grey[900] : Colors.white,
iconTheme: theme.primaryIconTheme.copyWith(color: Colors.grey),
textTheme: theme.textTheme,
),

View File

@@ -741,7 +741,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
applyElevationOverlayColor: false,
pageTransitionsTheme: pageTransitionTheme,
appBarTheme: const AppBarTheme(color: Colors.black),
appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black),
colorScheme: const ColorScheme.light(),

View File

@@ -291,7 +291,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
applyElevationOverlayColor: false,
pageTransitionsTheme: pageTransitionTheme,
appBarTheme: const AppBarTheme(color: Colors.black),
appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black),
colorScheme: const ColorScheme.light(),
@@ -384,7 +384,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.padded,
applyElevationOverlayColor: true,
pageTransitionsTheme: const PageTransitionsTheme(),
appBarTheme: const AppBarTheme(color: Colors.white),
appBarTheme: const AppBarTheme(backgroundColor: Colors.white),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.white),
colorScheme: const ColorScheme.light(),