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
..
2023-12-20 22:05:29 +00:00
2024-02-01 00:05:22 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-31 16:13:17 +00:00
2024-01-31 16:13:17 +00:00
2023-12-15 14:13:31 -08:00
2024-01-31 16:13:17 +00:00
2023-12-15 14:13:31 -08:00
2024-01-29 22:00:51 +00:00
2024-01-24 16:49:18 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-23 19:24:54 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2024-01-19 18:29:07 +00:00
2023-12-15 14:13:31 -08:00
2024-02-01 21:11:26 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-02-01 00:05:22 +00:00
2024-01-09 09:05:06 +00:00
2024-01-30 16:28:31 -08:00
2024-01-29 21:21:34 -08:00
2024-02-01 04:59:05 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-16 21:40:08 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-26 19:12:24 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-16 10:08:27 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-26 19:12:24 +00:00
2024-01-31 09:58:00 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2024-02-02 01:48:17 +00:00
2023-12-15 14:13:31 -08:00
2024-01-22 10:01:05 +00:00
2024-01-22 10:01:05 +00:00
2024-01-22 11:13:31 +00:00
2024-01-22 11:13:31 +00:00
2023-12-15 14:13:31 -08:00
2024-02-02 01:48:17 +00:00
2023-12-15 14:13:31 -08:00
2024-01-30 16:28:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-20 22:05:29 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-30 16:28:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-29 21:21:34 -08:00
2024-01-30 22:41:15 +00:00
2023-12-15 14:13:31 -08:00
2024-01-23 17:47:06 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-09-21 10:06:21 -07:00
2023-12-15 14:13:31 -08:00
2024-01-31 09:58:00 -08:00
2023-12-20 22:05:29 +00:00
2023-12-15 14:13:31 -08:00
2023-12-20 22:05:29 +00:00
2023-12-15 14:13:31 -08:00
2024-01-24 19:45:47 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-29 19:11:59 +00:00
2023-12-15 14:13:31 -08:00
2024-02-02 01:48:17 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-20 00:27:18 +00:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2024-01-09 18:19:07 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-22 18:21:31 +00:00
2023-12-15 14:13:31 -08:00
2024-01-05 21:28:07 +00:00
2023-12-15 14:13:31 -08:00
2024-01-29 21:21:34 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-19 13:01:07 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2024-01-17 22:49:04 +00:00
2024-01-26 00:20:21 +00:00
2023-12-15 14:13:31 -08:00
2024-01-09 09:49:13 +00:00
2024-01-24 16:13:26 +00:00
2024-01-20 00:27:18 +00:00
2023-12-16 19:23:11 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-12 16:35:08 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-12 22:10:25 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 23:44:11 +00:00
2024-02-02 01:48:17 +00:00
2024-02-02 01:48:17 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-31 09:58:00 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-20 22:05:29 +00:00
2024-01-20 00:27:18 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-22 10:01:05 +00:00
2023-12-15 14:13:31 -08:00
2024-01-31 17:17:53 +00:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2024-01-20 00:27:18 +00:00
2023-12-15 14:13:31 -08:00