Repository navigation
Chips delete icon ignores IconTheme from Chip.iconTheme and ChipThemeData.iconTheme #146501
Copy link
Copy link
Closed
Labels
found in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.22Found to occur in 3.22Found to occur in 3.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
Run the code sample below
According to docs the iconTheme is used for all icons in the chip.
flutter/packages/flutter/lib/src/material/chip.dart
Lines 223 to 230 in 4967a94
| /// Theme used for all icons in the chip. | |
| /// | |
| /// If this is null and [ThemeData.useMaterial3] is true, then [IconThemeData] | |
| /// with a [ColorScheme.primary] color and a size of 18.0 is used when | |
| /// the chip is enabled, and [IconThemeData] with a [ColorScheme.onSurface] | |
| /// color and a size of 18.0 is used when the chip is disabled. Otherwise, | |
| /// it defaults to null. | |
| IconThemeData? get iconTheme; |
Expected results
Actual results
Code sample
Code sample
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.amber,
),
),
),
home: Scaffold(
body: Center(
child: FilterChip(
avatar: const Icon(Icons.favorite),
onDeleted: () {},
label: const Text('Filter Chip'),
onSelected: (value) {},
),
),
),
);
}
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
found in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.22Found to occur in 3.22Found to occur in 3.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Projects
- StatusShow more project fieldsDone (PR merged)


Activity
danagbemava-nc commentedon Apr 9, 2024
Reproducible using the code sample provided above.
flutter doctor -v
naveenpardeep commentedon Apr 11, 2024
please wrap FilterChip with Theme ---->>>>
Theme(data: Theme.of(context)
.copyWith(canvasColor: Colors.transparent),
child: child: FilterChip()
Fix chips delete icon override the default icon size and ignores `Ico…
github-actions commentedon May 7, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.