Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Apr 12, 2023

fixes #115824
fixes #119134
fixes #73215

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),
      home: const Example(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    const Color backgroundColor = Colors.yellow;

    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('Chips with backgroundColor',
                style: Theme.of(context).textTheme.bodyLarge),
            Wrap(
              spacing: 8.0,
              runSpacing: 4.0,
              children: <Widget>[
                RawChip(
                  label: const Text('RawChip'),
                  backgroundColor: backgroundColor,
                  onPressed: () {},
                ),
                ActionChip(
                  label: const Text('ActionChip'),
                  backgroundColor: backgroundColor,
                  onPressed: () {},
                ),
                ChoiceChip(
                  label: const Text('ChoiceChip'),
                  selected: false,
                  backgroundColor: backgroundColor,
                  onSelected: (bool value) {},
                ),
                FilterChip(
                  label: const Text('FilterChip'),
                  backgroundColor: backgroundColor,
                  onSelected: (bool value) {},
                ),
                InputChip(
                  label: const Text('InputChip'),
                  backgroundColor: backgroundColor,
                  onPressed: () {},
                ),
              ],
            ),
            const SizedBox(height: 32.0),
            Text('Chips without backgroundColor',
                style: Theme.of(context).textTheme.bodyLarge),
            Wrap(
              spacing: 8.0,
              runSpacing: 4.0,
              children: <Widget>[
                RawChip(label: const Text('RawChip'), onPressed: () {}),
                ActionChip(
                  label: const Text('ActionChip'),
                  onPressed: () {},
                ),
                ChoiceChip(
                  label: const Text('ChoiceChip'),
                  selected: false,
                  onSelected: (bool value) {},
                ),
                FilterChip(
                  label: const Text('FilterChip'),
                  onSelected: (bool value) {},
                ),
                InputChip(
                  label: const Text('InputChip'),
                  onPressed: () {},
                ),
              ],
            ),
            const SizedBox(height: 32.0),
            Text('Buttons with backgroundColor',
                style: Theme.of(context).textTheme.bodyLarge),
            Wrap(
              spacing: 8.0,
              runSpacing: 4.0,
              children: <Widget>[
                TextButton(
                  style: TextButton.styleFrom(
                    backgroundColor: backgroundColor,
                  ),
                  onPressed: () {},
                  child: const Text('TextButton'),
                ),
                ElevatedButton(
                  style: ElevatedButton.styleFrom(
                    backgroundColor: backgroundColor,
                  ),
                  onPressed: () {},
                  child: const Text('ElevatedButton'),
                ),
                OutlinedButton(
                  style: OutlinedButton.styleFrom(
                    backgroundColor: backgroundColor,
                  ),
                  onPressed: () {},
                  child: const Text('OutlinedButton'),
                ),
                FilledButton.tonal(
                  style: FilledButton.styleFrom(
                    backgroundColor: backgroundColor,
                  ),
                  onPressed: () {},
                  child: const Text('FilledButton'),
                ),
              ],
            ),
            const SizedBox(height: 32.0),
            Text('Buttons without backgroundColor',
                style: Theme.of(context).textTheme.bodyLarge),
            Wrap(
              spacing: 8.0,
              runSpacing: 4.0,
              children: <Widget>[
                TextButton(
                  onPressed: () {},
                  child: const Text('TextButton'),
                ),
                ElevatedButton(
                  onPressed: () {},
                  child: const Text('ElevatedButton'),
                ),
                OutlinedButton(
                  onPressed: () {},
                  child: const Text('OutlinedButton'),
                ),
                FilledButton.tonal(
                  onPressed: () {},
                  child: const Text('FilledButton'),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}

Before

Tap on chips with background color
Focus on chips with background color

After

Tap on chips with background color
Focus on chips with background color

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.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 12, 2023
@TahaTesser TahaTesser requested a review from HansMuller April 12, 2023 14:44
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.

LGTM

@HansMuller HansMuller merged commit 15cb1f8 into flutter:master Apr 17, 2023
@TahaTesser TahaTesser deleted the fix_chip_highlight_color branch April 17, 2023 20:44
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 17, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 18, 2023
Manual roll requested by [email protected]

flutter/flutter@50171bb...15cb1f8

2023-04-17 [email protected] Fix Chip highlight color isn't drawn on top of the background color (flutter/flutter#124673)
2023-04-17 [email protected] Deprecates string for reorderable list in material_localizations (flutter/flutter#124711)
2023-04-17 [email protected] Fix a null crash in SelectableRegion Widget  (flutter/flutter#124736)
2023-04-17 [email protected] Customize color and thickness of connected lines in Stepper.dart (flutter/flutter#122485)
2023-04-17 [email protected] Roll Flutter Engine from 30e1c4308213 to b2d07388ceb6 (7 revisions) (flutter/flutter#124987)
2023-04-17 [email protected] Remove token permissions for coverage. (flutter/flutter#124909)
2023-04-17 [email protected] Roll Packages from e4ec155 to 0277f2a (9 revisions) (flutter/flutter#124972)
2023-04-17 [email protected] Roll Flutter Engine from 360ca05311c8 to 30e1c4308213 (3 revisions) (flutter/flutter#124963)
2023-04-17 [email protected] Roll Flutter Engine from 4a998b73a2df to 360ca05311c8 (2 revisions) (flutter/flutter#124952)

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
@TahaTesser
Copy link
Member Author

TahaTesser commented Apr 18, 2023

@HansMuller
This PR fixed #73215 too.
Updated the description of this PR and closed the issue.

@HansMuller
Copy link
Contributor

NICE

@reidbaker reidbaker mentioned this pull request Apr 21, 2023
8 tasks
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
Manual roll requested by [email protected]

flutter/flutter@50171bb...15cb1f8

2023-04-17 [email protected] Fix Chip highlight color isn't drawn on top of the background color (flutter/flutter#124673)
2023-04-17 [email protected] Deprecates string for reorderable list in material_localizations (flutter/flutter#124711)
2023-04-17 [email protected] Fix a null crash in SelectableRegion Widget  (flutter/flutter#124736)
2023-04-17 [email protected] Customize color and thickness of connected lines in Stepper.dart (flutter/flutter#122485)
2023-04-17 [email protected] Roll Flutter Engine from 30e1c4308213 to b2d07388ceb6 (7 revisions) (flutter/flutter#124987)
2023-04-17 [email protected] Remove token permissions for coverage. (flutter/flutter#124909)
2023-04-17 [email protected] Roll Packages from e4ec155 to 0277f2a (9 revisions) (flutter/flutter#124972)
2023-04-17 [email protected] Roll Flutter Engine from 360ca05311c8 to 30e1c4308213 (3 revisions) (flutter/flutter#124963)
2023-04-17 [email protected] Roll Flutter Engine from 4a998b73a2df to 360ca05311c8 (2 revisions) (flutter/flutter#124952)

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

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

2 participants