Unverified Commit c66596e5 authored by Hans Muller's avatar Hans Muller Committed by GitHub

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

parent 3b7e3d4b
...@@ -729,7 +729,7 @@ class _AppBarState extends State<AppBar> { ...@@ -729,7 +729,7 @@ class _AppBarState extends State<AppBar> {
final Color backgroundColor = backwardsCompatibility final Color backgroundColor = backwardsCompatibility
? widget.backgroundColor ? widget.backgroundColor
?? appBarTheme.color ?? appBarTheme.backgroundColor
?? theme.primaryColor ?? theme.primaryColor
: widget.backgroundColor : widget.backgroundColor
?? appBarTheme.backgroundColor ?? appBarTheme.backgroundColor
......
...@@ -43,10 +43,10 @@ class AppBarTheme with Diagnosticable { ...@@ -43,10 +43,10 @@ class AppBarTheme with Diagnosticable {
this.titleTextStyle, this.titleTextStyle,
this.systemOverlayStyle, this.systemOverlayStyle,
this.backwardsCompatibility, this.backwardsCompatibility,
}) : assert( }) : assert(
color == null || backgroundColor == null, color == null || backgroundColor == null,
'The color and backgroundColor parameters mean the same thing. Only specify one.'), 'The color and backgroundColor parameters mean the same thing. Only specify one.'),
backgroundColor = backgroundColor ?? color; backgroundColor = backgroundColor ?? color;
/// This property is obsolete, please use [systemOverlayStyle] instead. /// This property is obsolete, please use [systemOverlayStyle] instead.
/// ///
......
...@@ -229,7 +229,7 @@ abstract class SearchDelegate<T> { ...@@ -229,7 +229,7 @@ abstract class SearchDelegate<T> {
return theme.copyWith( return theme.copyWith(
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
brightness: colorScheme.brightness, 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), iconTheme: theme.primaryIconTheme.copyWith(color: Colors.grey),
textTheme: theme.textTheme, textTheme: theme.textTheme,
), ),
......
...@@ -741,7 +741,7 @@ void main() { ...@@ -741,7 +741,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
applyElevationOverlayColor: false, applyElevationOverlayColor: false,
pageTransitionsTheme: pageTransitionTheme, pageTransitionsTheme: pageTransitionTheme,
appBarTheme: const AppBarTheme(color: Colors.black), appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)), scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black), bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black),
colorScheme: const ColorScheme.light(), colorScheme: const ColorScheme.light(),
......
...@@ -291,7 +291,7 @@ void main() { ...@@ -291,7 +291,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
applyElevationOverlayColor: false, applyElevationOverlayColor: false,
pageTransitionsTheme: pageTransitionTheme, pageTransitionsTheme: pageTransitionTheme,
appBarTheme: const AppBarTheme(color: Colors.black), appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)), scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black), bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black),
colorScheme: const ColorScheme.light(), colorScheme: const ColorScheme.light(),
...@@ -384,7 +384,7 @@ void main() { ...@@ -384,7 +384,7 @@ void main() {
materialTapTargetSize: MaterialTapTargetSize.padded, materialTapTargetSize: MaterialTapTargetSize.padded,
applyElevationOverlayColor: true, applyElevationOverlayColor: true,
pageTransitionsTheme: const PageTransitionsTheme(), pageTransitionsTheme: const PageTransitionsTheme(),
appBarTheme: const AppBarTheme(color: Colors.white), appBarTheme: const AppBarTheme(backgroundColor: Colors.white),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)), scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.white), bottomAppBarTheme: const BottomAppBarTheme(color: Colors.white),
colorScheme: const ColorScheme.light(), colorScheme: const ColorScheme.light(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment