In Flutter 3.3.0 primary should never used because of deprecation... by right clicking on primary I get a migration hint to change primary -> foregroundColor...
But the onPrimary property is also deprecated. The migration guide says: change onPrimary to foregroundColor (there is no onForegroundColor)... but there is the problem. onPrimary should be in high contrast to primary.
What is to do here?
Code Example:
ElevatedButtonThemeData getElevatedButtonTheme(ColorScheme colorScheme, TextTheme textTheme) => ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(32)),
elevation: 1,
primary: colorScheme.secondary,
onPrimary: colorScheme.onSecondary,
textStyle: textTheme.button,
),
);
update: by clicking in the flutter code I found a comment "..use disabledForegroundColor..."