Skip to content

Fix RawChip doesn't use ChipTheme.showCheckmark value - #131257

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
TahaTesser:fix_raw_chip_show_checkmark
Jul 25, 2023
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
TahaTesser:fix_raw_chip_show_checkmark

Conversation

@TahaTesser

Copy link
Copy Markdown
Contributor

fixes RawChip doesn't use ChipThemeData.showCheckmark value

Description

RawChip.showCheckmark is nullable yet the constructor falsely assigns a default which breaks ChipTheme support. This PR removes the falsely assigned default value.

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(useMaterial3: true,
        chipTheme: const ChipThemeData(
          showCheckmark: false,
        )
      ),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            const RawChip(
              selected: true,
              label: Text('RawChip'),
            ),
            FilterChip(
              selected: true,
              label: const Text('RawChip'), onSelected: (bool value) {  },
            ),
          ],
        ),
      ),
    );
  }
}

Before

before

After

after

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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. p: material_ui material_ui package in flutter/packages labels Jul 25, 2023
@TahaTesser
TahaTesser requested a review from HansMuller July 25, 2023 14:28
@TahaTesser

Copy link
Copy Markdown
Contributor Author

Just a small fix, for an issue I had in my mind. cc: @HansMuller

@HansMuller HansMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@HansMuller HansMuller added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 25, 2023
@auto-submit
auto-submit Bot merged commit 62adfcf into flutter:master Jul 25, 2023
@TahaTesser
TahaTesser deleted the fix_raw_chip_show_checkmark branch July 25, 2023 15:53
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2023
tarrinneal pushed a commit to flutter/packages that referenced this pull request Jul 26, 2023
flutter/flutter@9def8f6...bae1ac2

2023-07-26 [email protected] ImageDecoration.lerp (flutter/flutter#130533)
2023-07-26 [email protected] Document the Flow/Opacity/hit-test issues
(flutter/flutter#131239)
2023-07-26 [email protected] Run benchmarks with
`--omit-type-checks` (flutter/flutter#131102)
2023-07-26 [email protected] Roll Flutter Engine from
ba83c144f84e to faf1121d010c (2 revisions) (flutter/flutter#131339)
2023-07-26 [email protected] Roll Packages from
406eac1 to a99fc87 (1 revision) (flutter/flutter#131336)
2023-07-26 [email protected] [flutter roll] Revert "Fix floating
SnackBar throws when FAB is on the top" (flutter/flutter#131303)
2023-07-26 [email protected] Roll Flutter Engine from
89203002f455 to ba83c144f84e (1 revision) (flutter/flutter#131329)
2023-07-26 [email protected] Roll Flutter Engine from
b3cd1c599abe to 89203002f455 (1 revision) (flutter/flutter#131323)
2023-07-26 [email protected] Roll Flutter Engine from
4bdceccff964 to b3cd1c599abe (1 revision) (flutter/flutter#131317)
2023-07-26 [email protected] Roll Flutter Engine from
df12fff329a1 to 4bdceccff964 (2 revisions) (flutter/flutter#131316)
2023-07-26 [email protected] Roll Flutter Engine from
43f727e4748a to df12fff329a1 (3 revisions) (flutter/flutter#131314)
2023-07-26 [email protected] Roll Flutter Engine from
7f3b0d6b7250 to 43f727e4748a (1 revision) (flutter/flutter#131311)
2023-07-26 [email protected] Roll Flutter Engine from
db711f14842b to 7f3b0d6b7250 (4 revisions) (flutter/flutter#131309)
2023-07-26 [email protected] Reorders menu item button
shortcuts on Mac-like platforms (flutter/flutter#129309)
2023-07-26 [email protected] Roll Flutter Engine from
9e00c11eb519 to db711f14842b (3 revisions) (flutter/flutter#131307)
2023-07-26 [email protected] Ignore unused parameters in snippet code
(flutter/flutter#131068)
2023-07-25 [email protected] Roll Flutter Engine from
3fff7316dc8d to 9e00c11eb519 (1 revision) (flutter/flutter#131299)
2023-07-25 [email protected] Add example for locking screen orientation
in a letterboxing environment (flutter/flutter#131266)
2023-07-25 [email protected] Update BottomAppBar and
BottomAppBarTheme tests for M3 (flutter/flutter#130983)
2023-07-25 [email protected] Roll Flutter Engine from
f5fbfa859b63 to 3fff7316dc8d (4 revisions) (flutter/flutter#131286)
2023-07-25 [email protected] Add Sabin Neupane
to AUTHORS (flutter/flutter#131237)
2023-07-25 [email protected] Roll Packages from
8028caf to 406eac1 (4 revisions) (flutter/flutter#131285)
2023-07-25 [email protected] Roll Flutter Engine from
0a5c6cdd5d02 to f5fbfa859b63 (8 revisions) (flutter/flutter#131283)
2023-07-25 [email protected] 🚀 Expose
`scrollControlDisabledMaxHeightRatio` to the modal bottom sheet
(flutter/flutter#129688)
2023-07-25 [email protected] Revert "Proposal
to add barrier configs for showDatePicker, showTimePicker and
showAboutDialog." (flutter/flutter#131278)
2023-07-25 [email protected] Roll Flutter Engine from
036c58f79307 to 0a5c6cdd5d02 (1 revision) (flutter/flutter#131256)
2023-07-25 [email protected] Fix `RawChip` doesn't use
`ChipTheme.showCheckmark` value (flutter/flutter#131257)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…1257)

fixes [`RawChip` doesn't use `ChipThemeData.showCheckmark` value](flutter#119163)

### Description

`RawChip.showCheckmark` is nullable yet the constructor falsely assigns a default which breaks `ChipTheme` support. This PR removes the falsely assigned default value.

### 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(useMaterial3: true,
        chipTheme: const ChipThemeData(
          showCheckmark: false,
        )
      ),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            const RawChip(
              selected: true,
              label: Text('RawChip'),
            ),
            FilterChip(
              selected: true,
              label: const Text('RawChip'), onSelected: (bool value) {  },
            ),
          ],
        ),
      ),
    );
  }
}

``` 
	
</details>

### Before
![before](https://github.com/flutter/flutter/assets/48603081/c8050c28-d988-4c72-8e0a-6455aa02d119)

### After

![after](https://github.com/flutter/flutter/assets/48603081/d5e83e81-6c12-4594-a2fd-8f113d6c9b54)
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
…1257)

fixes [`RawChip` doesn't use `ChipThemeData.showCheckmark` value](flutter#119163)

### Description

`RawChip.showCheckmark` is nullable yet the constructor falsely assigns a default which breaks `ChipTheme` support. This PR removes the falsely assigned default value.

### 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(useMaterial3: true,
        chipTheme: const ChipThemeData(
          showCheckmark: false,
        )
      ),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            const RawChip(
              selected: true,
              label: Text('RawChip'),
            ),
            FilterChip(
              selected: true,
              label: const Text('RawChip'), onSelected: (bool value) {  },
            ),
          ],
        ),
      ),
    );
  }
}

``` 
	
</details>

### Before
![before](https://github.com/flutter/flutter/assets/48603081/c8050c28-d988-4c72-8e0a-6455aa02d119)

### After

![after](https://github.com/flutter/flutter/assets/48603081/d5e83e81-6c12-4594-a2fd-8f113d6c9b54)
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
flutter/flutter@9def8f6...bae1ac2

2023-07-26 [email protected] ImageDecoration.lerp (flutter/flutter#130533)
2023-07-26 [email protected] Document the Flow/Opacity/hit-test issues
(flutter/flutter#131239)
2023-07-26 [email protected] Run benchmarks with
`--omit-type-checks` (flutter/flutter#131102)
2023-07-26 [email protected] Roll Flutter Engine from
ba83c144f84e to faf1121d010c (2 revisions) (flutter/flutter#131339)
2023-07-26 [email protected] Roll Packages from
406eac1 to a99fc87 (1 revision) (flutter/flutter#131336)
2023-07-26 [email protected] [flutter roll] Revert "Fix floating
SnackBar throws when FAB is on the top" (flutter/flutter#131303)
2023-07-26 [email protected] Roll Flutter Engine from
89203002f455 to ba83c144f84e (1 revision) (flutter/flutter#131329)
2023-07-26 [email protected] Roll Flutter Engine from
b3cd1c599abe to 89203002f455 (1 revision) (flutter/flutter#131323)
2023-07-26 [email protected] Roll Flutter Engine from
4bdceccff964 to b3cd1c599abe (1 revision) (flutter/flutter#131317)
2023-07-26 [email protected] Roll Flutter Engine from
df12fff329a1 to 4bdceccff964 (2 revisions) (flutter/flutter#131316)
2023-07-26 [email protected] Roll Flutter Engine from
43f727e4748a to df12fff329a1 (3 revisions) (flutter/flutter#131314)
2023-07-26 [email protected] Roll Flutter Engine from
7f3b0d6b7250 to 43f727e4748a (1 revision) (flutter/flutter#131311)
2023-07-26 [email protected] Roll Flutter Engine from
db711f14842b to 7f3b0d6b7250 (4 revisions) (flutter/flutter#131309)
2023-07-26 [email protected] Reorders menu item button
shortcuts on Mac-like platforms (flutter/flutter#129309)
2023-07-26 [email protected] Roll Flutter Engine from
9e00c11eb519 to db711f14842b (3 revisions) (flutter/flutter#131307)
2023-07-26 [email protected] Ignore unused parameters in snippet code
(flutter/flutter#131068)
2023-07-25 [email protected] Roll Flutter Engine from
3fff7316dc8d to 9e00c11eb519 (1 revision) (flutter/flutter#131299)
2023-07-25 [email protected] Add example for locking screen orientation
in a letterboxing environment (flutter/flutter#131266)
2023-07-25 [email protected] Update BottomAppBar and
BottomAppBarTheme tests for M3 (flutter/flutter#130983)
2023-07-25 [email protected] Roll Flutter Engine from
f5fbfa859b63 to 3fff7316dc8d (4 revisions) (flutter/flutter#131286)
2023-07-25 [email protected] Add Sabin Neupane
to AUTHORS (flutter/flutter#131237)
2023-07-25 [email protected] Roll Packages from
8028caf to 406eac1 (4 revisions) (flutter/flutter#131285)
2023-07-25 [email protected] Roll Flutter Engine from
0a5c6cdd5d02 to f5fbfa859b63 (8 revisions) (flutter/flutter#131283)
2023-07-25 [email protected] 🚀 Expose
`scrollControlDisabledMaxHeightRatio` to the modal bottom sheet
(flutter/flutter#129688)
2023-07-25 [email protected] Revert "Proposal
to add barrier configs for showDatePicker, showTimePicker and
showAboutDialog." (flutter/flutter#131278)
2023-07-25 [email protected] Roll Flutter Engine from
036c58f79307 to 0a5c6cdd5d02 (1 revision) (flutter/flutter#131256)
2023-07-25 [email protected] Fix `RawChip` doesn't use
`ChipTheme.showCheckmark` value (flutter/flutter#131257)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
flutter/flutter@9def8f6...bae1ac2

2023-07-26 [email protected] ImageDecoration.lerp (flutter/flutter#130533)
2023-07-26 [email protected] Document the Flow/Opacity/hit-test issues
(flutter/flutter#131239)
2023-07-26 [email protected] Run benchmarks with
`--omit-type-checks` (flutter/flutter#131102)
2023-07-26 [email protected] Roll Flutter Engine from
ba83c144f84e to faf1121d010c (2 revisions) (flutter/flutter#131339)
2023-07-26 [email protected] Roll Packages from
eef6d3e to 20cff72 (1 revision) (flutter/flutter#131336)
2023-07-26 [email protected] [flutter roll] Revert "Fix floating
SnackBar throws when FAB is on the top" (flutter/flutter#131303)
2023-07-26 [email protected] Roll Flutter Engine from
89203002f455 to ba83c144f84e (1 revision) (flutter/flutter#131329)
2023-07-26 [email protected] Roll Flutter Engine from
b3cd1c599abe to 89203002f455 (1 revision) (flutter/flutter#131323)
2023-07-26 [email protected] Roll Flutter Engine from
4bdceccff964 to b3cd1c599abe (1 revision) (flutter/flutter#131317)
2023-07-26 [email protected] Roll Flutter Engine from
df12fff329a1 to 4bdceccff964 (2 revisions) (flutter/flutter#131316)
2023-07-26 [email protected] Roll Flutter Engine from
43f727e4748a to df12fff329a1 (3 revisions) (flutter/flutter#131314)
2023-07-26 [email protected] Roll Flutter Engine from
7f3b0d6b7250 to 43f727e4748a (1 revision) (flutter/flutter#131311)
2023-07-26 [email protected] Roll Flutter Engine from
db711f14842b to 7f3b0d6b7250 (4 revisions) (flutter/flutter#131309)
2023-07-26 [email protected] Reorders menu item button
shortcuts on Mac-like platforms (flutter/flutter#129309)
2023-07-26 [email protected] Roll Flutter Engine from
9e00c11eb519 to db711f14842b (3 revisions) (flutter/flutter#131307)
2023-07-26 [email protected] Ignore unused parameters in snippet code
(flutter/flutter#131068)
2023-07-25 [email protected] Roll Flutter Engine from
3fff7316dc8d to 9e00c11eb519 (1 revision) (flutter/flutter#131299)
2023-07-25 [email protected] Add example for locking screen orientation
in a letterboxing environment (flutter/flutter#131266)
2023-07-25 [email protected] Update BottomAppBar and
BottomAppBarTheme tests for M3 (flutter/flutter#130983)
2023-07-25 [email protected] Roll Flutter Engine from
f5fbfa859b63 to 3fff7316dc8d (4 revisions) (flutter/flutter#131286)
2023-07-25 [email protected] Add Sabin Neupane
to AUTHORS (flutter/flutter#131237)
2023-07-25 [email protected] Roll Packages from
32681d2 to eef6d3e (4 revisions) (flutter/flutter#131285)
2023-07-25 [email protected] Roll Flutter Engine from
0a5c6cdd5d02 to f5fbfa859b63 (8 revisions) (flutter/flutter#131283)
2023-07-25 [email protected] 🚀 Expose
`scrollControlDisabledMaxHeightRatio` to the modal bottom sheet
(flutter/flutter#129688)
2023-07-25 [email protected] Revert "Proposal
to add barrier configs for showDatePicker, showTimePicker and
showAboutDialog." (flutter/flutter#131278)
2023-07-25 [email protected] Roll Flutter Engine from
036c58f79307 to 0a5c6cdd5d02 (1 revision) (flutter/flutter#131256)
2023-07-25 [email protected] Fix `RawChip` doesn't use
`ChipTheme.showCheckmark` value (flutter/flutter#131257)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RawChip doesn't use ChipThemeData.showCheckmark value

2 participants