New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed the color field from AppBarTheme #73732
Removed the color field from AppBarTheme #73732
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
}); | ||
}) : assert( | ||
color == null || backgroundColor == null, | ||
'The color and backgroundColor parameters mean the same thing. Only specify one.'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps '...parameters are used to describe the same thing.'
@@ -29,8 +29,8 @@ class AppBarTheme with Diagnosticable { | |||
/// Creates a theme that can be used for [ThemeData.appBarTheme]. | |||
const AppBarTheme({ | |||
this.brightness, | |||
this.color, | |||
this.backgroundColor, | |||
Color? color, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to mark this as deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to update some existing use cases first. After that this (and a few other parameters) will definitely be deprecated.
6839c54
to
c9e5aa9
Compare
The old color and the new backgroundColor field mean the same thing. The backgroundColor field was added in #71184 for the sake of consistency with AppBar.backgroundColor, however the original color field was not removed. It's now gone and there's an assert for the error of specifying both.