File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,29 +171,14 @@ class ElevatedButton extends ButtonStyleButton {
171171 bool ? enableFeedback,
172172 AlignmentGeometry ? alignment,
173173 InteractiveInkFeatureFactory ? splashFactory,
174- @Deprecated (
175- 'Use backgroundColor instead. '
176- 'This feature was deprecated after v3.1.0.'
177- )
178- Color ? primary,
179- @Deprecated (
180- 'Use foregroundColor instead. '
181- 'This feature was deprecated after v3.1.0.'
182- )
183- Color ? onPrimary,
184- @Deprecated (
185- 'Use disabledForegroundColor and disabledBackgroundColor instead. '
186- 'This feature was deprecated after v3.1.0.'
187- )
188- Color ? onSurface,
189174 }) {
190- final Color ? background = backgroundColor ?? primary ;
191- final Color ? disabledBackground = disabledBackgroundColor ?? onSurface ? . withOpacity ( 0.12 ) ;
175+ final Color ? background = backgroundColor;
176+ final Color ? disabledBackground = disabledBackgroundColor;
192177 final MaterialStateProperty <Color ?>? backgroundColorProp = (background == null && disabledBackground == null )
193178 ? null
194179 : _ElevatedButtonDefaultColor (background, disabledBackground);
195- final Color ? foreground = foregroundColor ?? onPrimary ;
196- final Color ? disabledForeground = disabledForegroundColor ?? onSurface ? . withOpacity ( 0.38 ) ;
180+ final Color ? foreground = foregroundColor;
181+ final Color ? disabledForeground = disabledForegroundColor;
197182 final MaterialStateProperty <Color ?>? foregroundColorProp = (foreground == null && disabledForeground == null )
198183 ? null
199184 : _ElevatedButtonDefaultColor (foreground, disabledForeground);
Original file line number Diff line number Diff line change @@ -158,19 +158,9 @@ class OutlinedButton extends ButtonStyleButton {
158158 bool ? enableFeedback,
159159 AlignmentGeometry ? alignment,
160160 InteractiveInkFeatureFactory ? splashFactory,
161- @Deprecated (
162- 'Use foregroundColor instead. '
163- 'This feature was deprecated after v3.1.0.'
164- )
165- Color ? primary,
166- @Deprecated (
167- 'Use disabledForegroundColor instead. '
168- 'This feature was deprecated after v3.1.0.'
169- )
170- Color ? onSurface,
171161 }) {
172- final Color ? foreground = foregroundColor ?? primary ;
173- final Color ? disabledForeground = disabledForegroundColor ?? onSurface ? . withOpacity ( 0.38 ) ;
162+ final Color ? foreground = foregroundColor;
163+ final Color ? disabledForeground = disabledForegroundColor;
174164 final MaterialStateProperty <Color ?>? foregroundColorProp = (foreground == null && disabledForeground == null )
175165 ? null
176166 : _OutlinedButtonDefaultColor (foreground, disabledForeground);
Original file line number Diff line number Diff line change @@ -168,19 +168,9 @@ class TextButton extends ButtonStyleButton {
168168 bool ? enableFeedback,
169169 AlignmentGeometry ? alignment,
170170 InteractiveInkFeatureFactory ? splashFactory,
171- @Deprecated (
172- 'Use foregroundColor instead. '
173- 'This feature was deprecated after v3.1.0.'
174- )
175- Color ? primary,
176- @Deprecated (
177- 'Use disabledForegroundColor instead. '
178- 'This feature was deprecated after v3.1.0.'
179- )
180- Color ? onSurface,
181171 }) {
182- final Color ? foreground = foregroundColor ?? primary ;
183- final Color ? disabledForeground = disabledForegroundColor ?? onSurface ? . withOpacity ( 0.38 ) ;
172+ final Color ? foreground = foregroundColor;
173+ final Color ? disabledForeground = disabledForegroundColor;
184174 final MaterialStateProperty <Color ?>? foregroundColorProp = (foreground == null && disabledForeground == null )
185175 ? null
186176 : _TextButtonDefaultColor (foreground, disabledForeground);
Original file line number Diff line number Diff line change @@ -776,8 +776,8 @@ TimePickerThemeData _timePickerTheme({bool includeInputDecoration = false}) {
776776 final MaterialStateColor materialStateColor = MaterialStateColor .resolveWith (getColor);
777777 return TimePickerThemeData (
778778 backgroundColor: Colors .orange,
779- cancelButtonStyle: TextButton .styleFrom (primary : Colors .red),
780- confirmButtonStyle: TextButton .styleFrom (primary : Colors .green),
779+ cancelButtonStyle: TextButton .styleFrom (foregroundColor : Colors .red),
780+ confirmButtonStyle: TextButton .styleFrom (foregroundColor : Colors .green),
781781 hourMinuteTextColor: materialStateColor,
782782 hourMinuteColor: materialStateColor,
783783 dayPeriodTextColor: materialStateColor,
You can’t perform that action at this time.
0 commit comments