Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Apr 9, 2024

fixes Provided delete icon overrides the default delete icon size
fixes Chips delete icon ignores IconTheme from Chip.iconTheme and ChipThemeData.iconTheme

Code sample

expand to view the 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.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) {},
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Before

Screenshot 2024-04-09 at 16 48 48

After

Screenshot 2024-04-09 at 16 48 31

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Apr 9, 2024
@TahaTesser TahaTesser force-pushed the chips_delete_icon_icon_theme branch from 84d1f97 to 169b247 Compare April 9, 2024 17:35
@TahaTesser TahaTesser marked this pull request as ready for review April 9, 2024 18:14
@TahaTesser TahaTesser requested a review from HansMuller April 9, 2024 18:14
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #146509 at sha 169b247b5533e49d3ff0ee838d2afeddbeb455f2

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Apr 9, 2024
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some golden image changes to approve (they look OK to me) and this will likely cause some internal golden image tests to fail. Good fix though!

@QuncCccccc
Copy link
Contributor

Sent cl/625413895 for reviews. After merging it, this should good to go.

@TahaTesser

This comment was marked as resolved.

@QuncCccccc QuncCccccc force-pushed the chips_delete_icon_icon_theme branch from 169b247 to 48ff359 Compare April 19, 2024 21:57
@flutter-dashboard

This comment was marked as resolved.

@QuncCccccc
Copy link
Contributor

Just triaged all the golden changes.

…nTheme` from the chip property and `ChipThemeData`
@TahaTesser TahaTesser force-pushed the chips_delete_icon_icon_theme branch from 48ff359 to ee4d3d1 Compare April 22, 2024 07:08
@flutter-dashboard

This comment was marked as resolved.

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #146509 at sha 0af5a0a

@TahaTesser TahaTesser added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Apr 23, 2024
@TahaTesser
Copy link
Member Author

@QuncCccccc
Since there are no M2 defaults, delete button uses same delete icon size in both M2 and M3.
I've the update the default iconTheme to explicitly to use M3 defaults.

@TahaTesser TahaTesser requested a review from QuncCccccc April 23, 2024 07:18
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 23, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Apr 23, 2024

auto label is removed for flutter/flutter/146509, due to - The status or check suite Linux analyze has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 23, 2024
@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 23, 2024
@auto-submit auto-submit bot merged commit e34a9e3 into flutter:master Apr 23, 2024
@TahaTesser TahaTesser deleted the chips_delete_icon_icon_theme branch April 23, 2024 19:46
@TahaTesser
Copy link
Member Author

@QuncCccccc
Thanks for all your help, it was only possible to land because of you.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2024
…res `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2024
…res `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2024
…res `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 24, 2024
flutter/flutter@77043ba...dba4f77

2024-04-24 [email protected] Fix memory leaks in `BottomNavigationBar`  (flutter/flutter#147213)
2024-04-24 [email protected] Disable leak tracking for selection text area (flutter/flutter#147273)
2024-04-24 [email protected] Add missing `overlayColor` property in `styleFrom` methods (flutter/flutter#146685)
2024-04-24 [email protected] Roll Flutter Engine from 3d91141e7e18 to b5d5832f7144 (1 revision) (flutter/flutter#147293)
2024-04-24 [email protected] Roll Flutter Engine from d4f63383d329 to 3d91141e7e18 (1 revision) (flutter/flutter#147281)
2024-04-24 [email protected] Roll Flutter Engine from fcb106011371 to d4f63383d329 (1 revision) (flutter/flutter#147276)
2024-04-24 [email protected] Roll Flutter Engine from 7f89b4367338 to fcb106011371 (1 revision) (flutter/flutter#147272)
2024-04-24 [email protected] Roll Flutter Engine from 9819627013f7 to 7f89b4367338 (2 revisions) (flutter/flutter#147270)
2024-04-24 [email protected] Roll Flutter Engine from d56a231cddc2 to 9819627013f7 (3 revisions) (flutter/flutter#147267)
2024-04-23 [email protected] Roll Flutter Engine from 5f17a779f19d to d56a231cddc2 (1 revision) (flutter/flutter#147266)
2024-04-23 [email protected] Roll Flutter Engine from 303e71890897 to 5f17a779f19d (1 revision) (flutter/flutter#147264)
2024-04-23 [email protected] Remove unneeded local variables and comments in Editable and RenderParagraph (flutter/flutter#146843)
2024-04-23 [email protected] Add test for sliver_animated_opacity.0.dart API example. (flutter/flutter#146722)
2024-04-23 [email protected] Adds AutovalidateMode.onFocusChange to Form and FormField (flutter/flutter#140962)
2024-04-23 [email protected] Roll Flutter Engine from b686508a1dbf to 303e71890897 (4 revisions) (flutter/flutter#147262)
2024-04-23 [email protected] Roll Flutter Engine from f23cc4dda1ad to b686508a1dbf (4 revisions) (flutter/flutter#147258)
2024-04-23 [email protected] Add test for focus_node.0.dart API example. (flutter/flutter#146943)
2024-04-23 [email protected] Roll Flutter Engine from 066953b74042 to f23cc4dda1ad (3 revisions) (flutter/flutter#147255)
2024-04-23 [email protected] Refactor framework + test harness tests (flutter/flutter#146213)
2024-04-23 [email protected] Fix chips delete icon override the default icon size and ignores `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
2024-04-23 [email protected] Roll Flutter Engine from f794e6719d3c to 066953b74042 (3 revisions) (flutter/flutter#147248)
2024-04-23 [email protected] Fix frozen `StretchingOverscrollIndicator` animation (flutter/flutter#147195)
2024-04-23 [email protected] Add test for animated_align.0.dart API example. (flutter/flutter#146719)
2024-04-23 [email protected] Fix typos related to Navigator (flutter/flutter#147221)
2024-04-23 [email protected] Fix memory leak in switch painter (flutter/flutter#147228)
2024-04-23 [email protected] Add test for animated_positioned.0.dart API example. (flutter/flutter#146720)
2024-04-23 [email protected] Update icon tree shaker to allow system font fallback (flutter/flutter#147202)
2024-04-23 [email protected] `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#146293)
2024-04-23 [email protected] Roll Flutter Engine from 79f49954cce8 to f794e6719d3c (1 revision) (flutter/flutter#147241)
2024-04-23 [email protected] Roll Packages from 01a32c4 to cf6d280 (5 revisions) (flutter/flutter#147240)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
flutter/flutter@77043ba...dba4f77

2024-04-24 [email protected] Fix memory leaks in `BottomNavigationBar`  (flutter/flutter#147213)
2024-04-24 [email protected] Disable leak tracking for selection text area (flutter/flutter#147273)
2024-04-24 [email protected] Add missing `overlayColor` property in `styleFrom` methods (flutter/flutter#146685)
2024-04-24 [email protected] Roll Flutter Engine from 3d91141e7e18 to b5d5832f7144 (1 revision) (flutter/flutter#147293)
2024-04-24 [email protected] Roll Flutter Engine from d4f63383d329 to 3d91141e7e18 (1 revision) (flutter/flutter#147281)
2024-04-24 [email protected] Roll Flutter Engine from fcb106011371 to d4f63383d329 (1 revision) (flutter/flutter#147276)
2024-04-24 [email protected] Roll Flutter Engine from 7f89b4367338 to fcb106011371 (1 revision) (flutter/flutter#147272)
2024-04-24 [email protected] Roll Flutter Engine from 9819627013f7 to 7f89b4367338 (2 revisions) (flutter/flutter#147270)
2024-04-24 [email protected] Roll Flutter Engine from d56a231cddc2 to 9819627013f7 (3 revisions) (flutter/flutter#147267)
2024-04-23 [email protected] Roll Flutter Engine from 5f17a779f19d to d56a231cddc2 (1 revision) (flutter/flutter#147266)
2024-04-23 [email protected] Roll Flutter Engine from 303e71890897 to 5f17a779f19d (1 revision) (flutter/flutter#147264)
2024-04-23 [email protected] Remove unneeded local variables and comments in Editable and RenderParagraph (flutter/flutter#146843)
2024-04-23 [email protected] Add test for sliver_animated_opacity.0.dart API example. (flutter/flutter#146722)
2024-04-23 [email protected] Adds AutovalidateMode.onFocusChange to Form and FormField (flutter/flutter#140962)
2024-04-23 [email protected] Roll Flutter Engine from b686508a1dbf to 303e71890897 (4 revisions) (flutter/flutter#147262)
2024-04-23 [email protected] Roll Flutter Engine from f23cc4dda1ad to b686508a1dbf (4 revisions) (flutter/flutter#147258)
2024-04-23 [email protected] Add test for focus_node.0.dart API example. (flutter/flutter#146943)
2024-04-23 [email protected] Roll Flutter Engine from 066953b74042 to f23cc4dda1ad (3 revisions) (flutter/flutter#147255)
2024-04-23 [email protected] Refactor framework + test harness tests (flutter/flutter#146213)
2024-04-23 [email protected] Fix chips delete icon override the default icon size and ignores `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
2024-04-23 [email protected] Roll Flutter Engine from f794e6719d3c to 066953b74042 (3 revisions) (flutter/flutter#147248)
2024-04-23 [email protected] Fix frozen `StretchingOverscrollIndicator` animation (flutter/flutter#147195)
2024-04-23 [email protected] Add test for animated_align.0.dart API example. (flutter/flutter#146719)
2024-04-23 [email protected] Fix typos related to Navigator (flutter/flutter#147221)
2024-04-23 [email protected] Fix memory leak in switch painter (flutter/flutter#147228)
2024-04-23 [email protected] Add test for animated_positioned.0.dart API example. (flutter/flutter#146720)
2024-04-23 [email protected] Update icon tree shaker to allow system font fallback (flutter/flutter#147202)
2024-04-23 [email protected] `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#146293)
2024-04-23 [email protected] Roll Flutter Engine from 79f49954cce8 to f794e6719d3c (1 revision) (flutter/flutter#147241)
2024-04-23 [email protected] Roll Packages from 01a32c4 to cf6d280 (5 revisions) (flutter/flutter#147240)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
…res `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chips delete icon ignores IconTheme from Chip.iconTheme and ChipThemeData.iconTheme Provided delete icon overrides the default delete icon size

3 participants