mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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 