flutter/examples/api/test/material/text_button
Hans Muller c6f2cea65e
Reland: Added ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder (#142762)
Reland https://github.com/flutter/flutter/pull/141818 with a fix for a special case: If only `background` is specified for `TextButton.styleFrom` or `OutlinedButton.styleFrom` it applies the button's disabled state, i.e. as if the same value had been specified for disabledBackgroundColor.

The change relative to #141818 is the indicated line below:
```dart
final MaterialStateProperty<Color?>? backgroundColorProp = switch ((backgroundColor, disabledBackgroundColor)) {
  (null, null) => null,
  (_, null) => MaterialStatePropertyAll<Color?>(backgroundColor), // ADDED THIS LINE
  (_, _) => _TextButtonDefaultColor(backgroundColor, disabledBackgroundColor),
};
  ```

This backwards incompatibility cropped up in an internal test, see internal Google issue b/323399158.
2024-02-02 01:48:17 +00:00
..
text_button.0_test.dart Reland: Added ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder (#142762) 2024-02-02 01:48:17 +00:00
text_button.1_test.dart Reland Added MaterialStatesController, updated InkWell et al. #103167 (#105656) 2022-06-10 08:12:49 -07:00