Deprecate ThemeData errorColor and backgroundColor (#110162)
This commit is contained in:
@@ -41,7 +41,7 @@ class InputDecoratorExample extends StatelessWidget {
|
||||
// is in its error state.
|
||||
floatingLabelStyle: MaterialStateTextStyle.resolveWith(
|
||||
(Set<MaterialState> states) {
|
||||
final Color color = states.contains(MaterialState.error) ? Theme.of(context).errorColor: Colors.orange;
|
||||
final Color color = states.contains(MaterialState.error) ? Theme.of(context).colorScheme.error: Colors.orange;
|
||||
return TextStyle(color: color, letterSpacing: 1.3);
|
||||
}
|
||||
),
|
||||
|
||||
@@ -41,7 +41,7 @@ class InputDecoratorExample extends StatelessWidget {
|
||||
// is in its error state.
|
||||
labelStyle: MaterialStateTextStyle.resolveWith(
|
||||
(Set<MaterialState> states) {
|
||||
final Color color = states.contains(MaterialState.error) ? Theme.of(context).errorColor: Colors.orange;
|
||||
final Color color = states.contains(MaterialState.error) ? Theme.of(context).colorScheme.error: Colors.orange;
|
||||
return TextStyle(color: color, letterSpacing: 1.3);
|
||||
}
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user