Taha Tesser
e34a9e3f39
Fix chips delete icon override the default icon size and ignores IconTheme from the chip property and ChipThemeData (#146509)
fixes [Provided delete icon overrides the default delete icon size](https://github.com/flutter/flutter/issues/146404)
fixes [Chips delete icon ignores `IconTheme` from `Chip.iconTheme` and `ChipThemeData.iconTheme`](https://github.com/flutter/flutter/issues/146501)
### 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(
debugShowCheckedModeBanner: false,
theme: ThemeData(
chipTheme: const ChipThemeData(
iconTheme: IconThemeData(
color: Colors.red,
),
),
),
home: Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FilterChip(
avatar: const Icon(Icons.favorite),
onDeleted: () {},
label: const Text('Filter Chip'),
onSelected: (value) {},
),
const SizedBox(height: 10),
FilterChip(
avatar: const Icon(Icons.favorite),
// ignore: prefer_const_constructors
deleteIcon: const Icon(Icons.delete),
onDeleted: () {},
label: const Text('Filter Chip'),
onSelected: (value) {},
),
],
),
),
),
);
}
}
```
</details>
### Before

### After

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