flutter/packages
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
..
flutter Reland: Added ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder (#142762) 2024-02-02 01:48:17 +00:00
flutter_driver Unpin test (#141427) 2024-02-01 18:53:23 +00:00
flutter_goldens Unpin test (#141427) 2024-02-01 18:53:23 +00:00
flutter_localizations Unpin test (#141427) 2024-02-01 18:53:23 +00:00
flutter_test Unpin test (#141427) 2024-02-01 18:53:23 +00:00
flutter_tools Upload DerivedData logs in CI (#142643) 2024-02-01 21:31:28 +00:00
flutter_web_plugins Unpin test (#141427) 2024-02-01 18:53:23 +00:00
fuchsia_remote_debug_protocol Unpin test (#141427) 2024-02-01 18:53:23 +00:00
integration_test Unpin test (#141427) 2024-02-01 18:53:23 +00:00
analysis_options.yaml