auto-submit[bot]
b5697a0c6d
Reverts "Fix SegmentedButton clipping when drawing segments (#149739)" (#149927)
Reverts: flutter/flutter#149739
Initiated by: QuncCccccc
Reason for reverting: the newly-added unit test might cause the red tree
Original PR Author: TahaTesser
Reviewed By: {QuncCccccc}
This change reverts the following previous change:
fixes [`SegmentedButton` doesn't clip properly when one of the segments has `ColorFiltered`](https://github.com/flutter/flutter/issues/144990)
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: SegmentedButton<int>(
segments: const <ButtonSegment<int>>[
ButtonSegment<int>(
value: 0,
label: ColorFiltered(
colorFilter:
ColorFilter.mode(Colors.amber, BlendMode.colorBurn),
child: Text('Option 1'),
),
),
ButtonSegment<int>(
value: 1,
label: Text('Option 2'),
),
],
onSelectionChanged: (Set<int> selected) {},
selected: const <int>{0},
),
),
),
);
}
}
```
</details>
### Before

### After

2024-06-07 19:30:18 +00:00
..
2024-05-09 16:31:54 -06:00
2024-05-29 18:46:04 +00:00
2024-06-06 20:35:18 +00:00
2024-03-01 06:40:47 +00:00
2024-04-08 18:42:07 +00:00
2024-05-01 22:05:02 +00:00
2024-05-09 16:47:16 +00:00
2024-05-20 17:43:03 +00:00
2024-02-28 00:07:51 +00:00
2024-02-28 13:55:50 -08:00
2024-05-20 17:43:03 +00:00
2024-04-03 15:18:06 +00:00
2024-04-01 11:39:48 +00:00
2024-05-09 16:31:54 -06:00
2024-04-02 18:37:05 +00:00
2024-05-22 07:11:07 +00:00
2024-03-28 01:20:55 +00:00
2024-05-09 16:31:54 -06:00
2024-05-09 16:31:54 -06:00
2024-05-09 16:31:54 -06:00
2024-06-05 21:03:21 +00:00
2024-05-10 23:37:05 +00:00
2024-05-14 13:46:35 -07:00
2024-05-10 23:37:05 +00:00
2024-06-06 20:35:18 +00:00
2024-06-06 20:35:18 +00:00
2024-06-05 22:16:08 +00:00
2024-04-01 09:42:51 +00:00
2024-05-20 17:43:03 +00:00
2024-05-30 17:53:03 +00:00
2024-05-30 17:53:03 +00:00
2024-05-10 22:08:59 +00:00
2024-05-30 17:43:26 +00:00
2024-05-15 18:37:07 +00:00
2024-05-21 16:18:05 +00:00
2024-06-03 11:19:29 -07:00
2024-05-21 19:15:21 +00:00
2024-02-28 13:55:50 -08:00
2024-05-31 01:44:32 +00:00
2024-05-31 01:44:32 +00:00
2024-05-04 18:19:29 -07:00
2024-02-28 13:55:50 -08:00
2024-06-06 20:35:18 +00:00
2024-04-29 08:26:19 +00:00
2024-04-26 04:38:22 +00:00
2024-05-01 12:58:35 -07:00
2024-05-01 12:58:35 -07:00
2024-05-20 17:43:03 +00:00
2024-05-20 17:43:03 +00:00
2024-05-20 17:43:03 +00:00
2024-05-20 17:43:03 +00:00
2024-05-18 10:41:56 -07:00
2024-05-21 16:18:05 +00:00
2024-06-06 20:35:18 +00:00
2024-02-29 15:16:53 -08:00
2024-06-06 06:11:25 +00:00
2024-03-19 17:58:16 +00:00
2024-04-02 18:37:05 +00:00
2024-04-08 22:01:05 +00:00
2024-04-22 16:49:19 +00:00
2024-05-30 10:54:17 -07:00
2024-06-03 17:11:36 +00:00
2024-05-22 07:11:07 +00:00
2024-05-20 17:43:03 +00:00
2024-05-20 17:43:03 +00:00
2024-05-20 17:43:03 +00:00
2024-05-08 11:05:24 +00:00
2024-05-21 16:44:05 +00:00
2024-05-31 03:50:30 +00:00
2024-05-13 22:45:51 +00:00
2024-05-24 21:38:08 +00:00
2024-03-27 16:43:10 -07:00
2024-05-29 19:06:07 +00:00
2024-03-19 17:00:24 +00:00
2024-02-29 20:58:11 +00:00
2024-05-14 13:46:35 -07:00
2024-05-20 17:43:03 +00:00
2024-03-22 13:55:06 +00:00
2024-05-20 17:43:03 +00:00
2024-03-13 16:31:50 +00:00
2024-05-01 12:58:35 -07:00
2024-05-29 00:20:18 +00:00
2024-05-22 07:11:07 +00:00
2024-05-20 17:43:03 +00:00
2024-06-07 19:30:18 +00:00
2024-05-18 10:41:56 -07:00
2024-02-28 14:36:08 -08:00
2024-04-03 15:49:38 -07:00
2024-05-30 14:49:13 +00:00
2024-05-30 14:49:13 +00:00
2024-05-29 04:31:32 +00:00
2024-05-21 16:18:05 +00:00
2024-02-29 20:58:11 +00:00
2024-05-14 13:46:35 -07:00
2024-05-07 20:54:09 +00:00
2024-04-22 20:28:50 +00:00
2024-05-20 17:43:03 +00:00
2024-02-28 13:55:50 -08:00
2024-05-23 22:25:51 +00:00
2024-05-23 22:25:51 +00:00
2024-03-01 06:40:47 +00:00
2024-03-01 06:40:47 +00:00
2024-03-28 01:20:55 +00:00
2024-05-30 17:54:53 +00:00
2024-05-30 17:54:53 +00:00
2024-03-19 17:00:24 +00:00
2024-05-18 10:41:56 -07:00
2024-03-04 20:20:19 +00:00
2024-04-23 16:32:15 +00:00
2024-05-20 17:43:03 +00:00
2024-03-09 01:08:06 +00:00
2024-04-16 12:15:37 -07:00