Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing overlayColor property in styleFrom methods #146685

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

TahaTesser
Copy link
Member

fixes Add missing overlayColor property in styleFrom methods

Code sample

expand to view the code sample
import 'package:flutter/material.dart';

enum Sizes { extraSmall, small, medium, large, extraLarge }

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              Text('styleFrom(overlayColor: Colors.red)', style: Theme.of(context).textTheme.titleLarge),
              TextButton(
                style: TextButton.styleFrom(overlayColor: Colors.red),
                onPressed: () {},
                child: const Text('TextButton'),
              ),
              IconButton(
                style: IconButton.styleFrom(
                  overlayColor: Colors.red,
                ),
                onPressed: () {},
                icon: const Icon(Icons.add),
              ),
              MenuBar(
                children: [
                  MenuItemButton(
                    style: MenuItemButton.styleFrom(overlayColor: Colors.red),
                    child: const Text('MenuItemButton'),
                    onPressed: () {},
                  ),
                  SubmenuButton(
                    style: SubmenuButton.styleFrom(overlayColor: Colors.red),
                    menuChildren: [
                      MenuItemButton(
                        child: const Text('MenuItemButton'),
                        onPressed: () {},
                      ),
                    ],
                    child: const Text('SubmenuButton'),
                  ),
                ],
              ),
              SegmentedButton<Sizes>(
                style:
                    SegmentedButton.styleFrom(overlayColor: Colors.red),
                segments: const <ButtonSegment<Sizes>>[
                  ButtonSegment<Sizes>(
                      value: Sizes.extraSmall, label: Text('XS')),
                  ButtonSegment<Sizes>(value: Sizes.small, label: Text('S')),
                  ButtonSegment<Sizes>(value: Sizes.medium, label: Text('M')),
                  ButtonSegment<Sizes>(
                    value: Sizes.large,
                    label: Text('L'),
                  ),
                  ButtonSegment<Sizes>(
                      value: Sizes.extraLarge, label: Text('XL')),
                ],
                selected: const {Sizes.medium},
                onSelectionChanged: (Set<Sizes> newSelection) {},
                multiSelectionEnabled: true,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Preview

ScreenRecording2024-04-12at15 25 58-ezgif com-video-to-gif-converter

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 12, 2024
@TahaTesser TahaTesser marked this pull request as ready for review April 12, 2024 14:14
@TahaTesser
Copy link
Member Author

@HansMuller
This PR adds the overlayColor prop you added in Buttons #142762

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.

Thanks for this update! LGTM

packages/flutter/lib/src/material/icon_button.dart Outdated Show resolved Hide resolved
@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2024
@auto-submit auto-submit bot merged commit fa85f69 into flutter:master Apr 24, 2024
139 checks passed
@TahaTesser TahaTesser deleted the overlayColor_styleFrom branch April 24, 2024 12:43
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 24, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 24, 2024
flutter/flutter@77043ba...dba4f77

2024-04-24 32538273+ValentinVignal@users.noreply.github.com Fix memory leaks in `BottomNavigationBar`  (flutter/flutter#147213)
2024-04-24 32538273+ValentinVignal@users.noreply.github.com Disable leak tracking for selection text area (flutter/flutter#147273)
2024-04-24 tessertaha@gmail.com Add missing `overlayColor` property in `styleFrom` methods (flutter/flutter#146685)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3d91141e7e18 to b5d5832f7144 (1 revision) (flutter/flutter#147293)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from d4f63383d329 to 3d91141e7e18 (1 revision) (flutter/flutter#147281)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from fcb106011371 to d4f63383d329 (1 revision) (flutter/flutter#147276)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7f89b4367338 to fcb106011371 (1 revision) (flutter/flutter#147272)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9819627013f7 to 7f89b4367338 (2 revisions) (flutter/flutter#147270)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from d56a231cddc2 to 9819627013f7 (3 revisions) (flutter/flutter#147267)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5f17a779f19d to d56a231cddc2 (1 revision) (flutter/flutter#147266)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 303e71890897 to 5f17a779f19d (1 revision) (flutter/flutter#147264)
2024-04-23 72562119+tgucio@users.noreply.github.com Remove unneeded local variables and comments in Editable and RenderParagraph (flutter/flutter#146843)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for sliver_animated_opacity.0.dart API example. (flutter/flutter#146722)
2024-04-23 50643541+Mairramer@users.noreply.github.com Adds AutovalidateMode.onFocusChange to Form and FormField (flutter/flutter#140962)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b686508a1dbf to 303e71890897 (4 revisions) (flutter/flutter#147262)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from f23cc4dda1ad to b686508a1dbf (4 revisions) (flutter/flutter#147258)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for focus_node.0.dart API example. (flutter/flutter#146943)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 066953b74042 to f23cc4dda1ad (3 revisions) (flutter/flutter#147255)
2024-04-23 103135467+sealesj@users.noreply.github.com Refactor framework + test harness tests (flutter/flutter#146213)
2024-04-23 tessertaha@gmail.com Fix chips delete icon override the default icon size and ignores `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from f794e6719d3c to 066953b74042 (3 revisions) (flutter/flutter#147248)
2024-04-23 82336674+gilnobrega@users.noreply.github.com Fix frozen `StretchingOverscrollIndicator` animation (flutter/flutter#147195)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for animated_align.0.dart API example. (flutter/flutter#146719)
2024-04-23 choi88andys@gmail.com Fix typos related to Navigator (flutter/flutter#147221)
2024-04-23 32538273+ValentinVignal@users.noreply.github.com Fix memory leak in switch painter (flutter/flutter#147228)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for animated_positioned.0.dart API example. (flutter/flutter#146720)
2024-04-23 katelovett@google.com Update icon tree shaker to allow system font fallback (flutter/flutter#147202)
2024-04-23 nate.w5687@gmail.com `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#146293)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 79f49954cce8 to f794e6719d3c (1 revision) (flutter/flutter#147241)
2024-04-23 engine-flutter-autoroll@skia.org 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 camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com 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
…r#6607)

flutter/flutter@77043ba...dba4f77

2024-04-24 32538273+ValentinVignal@users.noreply.github.com Fix memory leaks in `BottomNavigationBar`  (flutter/flutter#147213)
2024-04-24 32538273+ValentinVignal@users.noreply.github.com Disable leak tracking for selection text area (flutter/flutter#147273)
2024-04-24 tessertaha@gmail.com Add missing `overlayColor` property in `styleFrom` methods (flutter/flutter#146685)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3d91141e7e18 to b5d5832f7144 (1 revision) (flutter/flutter#147293)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from d4f63383d329 to 3d91141e7e18 (1 revision) (flutter/flutter#147281)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from fcb106011371 to d4f63383d329 (1 revision) (flutter/flutter#147276)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7f89b4367338 to fcb106011371 (1 revision) (flutter/flutter#147272)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9819627013f7 to 7f89b4367338 (2 revisions) (flutter/flutter#147270)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from d56a231cddc2 to 9819627013f7 (3 revisions) (flutter/flutter#147267)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5f17a779f19d to d56a231cddc2 (1 revision) (flutter/flutter#147266)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 303e71890897 to 5f17a779f19d (1 revision) (flutter/flutter#147264)
2024-04-23 72562119+tgucio@users.noreply.github.com Remove unneeded local variables and comments in Editable and RenderParagraph (flutter/flutter#146843)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for sliver_animated_opacity.0.dart API example. (flutter/flutter#146722)
2024-04-23 50643541+Mairramer@users.noreply.github.com Adds AutovalidateMode.onFocusChange to Form and FormField (flutter/flutter#140962)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b686508a1dbf to 303e71890897 (4 revisions) (flutter/flutter#147262)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from f23cc4dda1ad to b686508a1dbf (4 revisions) (flutter/flutter#147258)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for focus_node.0.dart API example. (flutter/flutter#146943)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 066953b74042 to f23cc4dda1ad (3 revisions) (flutter/flutter#147255)
2024-04-23 103135467+sealesj@users.noreply.github.com Refactor framework + test harness tests (flutter/flutter#146213)
2024-04-23 tessertaha@gmail.com Fix chips delete icon override the default icon size and ignores `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from f794e6719d3c to 066953b74042 (3 revisions) (flutter/flutter#147248)
2024-04-23 82336674+gilnobrega@users.noreply.github.com Fix frozen `StretchingOverscrollIndicator` animation (flutter/flutter#147195)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for animated_align.0.dart API example. (flutter/flutter#146719)
2024-04-23 choi88andys@gmail.com Fix typos related to Navigator (flutter/flutter#147221)
2024-04-23 32538273+ValentinVignal@users.noreply.github.com Fix memory leak in switch painter (flutter/flutter#147228)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for animated_positioned.0.dart API example. (flutter/flutter#146720)
2024-04-23 katelovett@google.com Update icon tree shaker to allow system font fallback (flutter/flutter#147202)
2024-04-23 nate.w5687@gmail.com `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#146293)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 79f49954cce8 to f794e6719d3c (1 revision) (flutter/flutter#147241)
2024-04-23 engine-flutter-autoroll@skia.org 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 camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com 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
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…r#6607)

flutter/flutter@77043ba...dba4f77

2024-04-24 32538273+ValentinVignal@users.noreply.github.com Fix memory leaks in `BottomNavigationBar`  (flutter/flutter#147213)
2024-04-24 32538273+ValentinVignal@users.noreply.github.com Disable leak tracking for selection text area (flutter/flutter#147273)
2024-04-24 tessertaha@gmail.com Add missing `overlayColor` property in `styleFrom` methods (flutter/flutter#146685)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3d91141e7e18 to b5d5832f7144 (1 revision) (flutter/flutter#147293)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from d4f63383d329 to 3d91141e7e18 (1 revision) (flutter/flutter#147281)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from fcb106011371 to d4f63383d329 (1 revision) (flutter/flutter#147276)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7f89b4367338 to fcb106011371 (1 revision) (flutter/flutter#147272)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9819627013f7 to 7f89b4367338 (2 revisions) (flutter/flutter#147270)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from d56a231cddc2 to 9819627013f7 (3 revisions) (flutter/flutter#147267)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5f17a779f19d to d56a231cddc2 (1 revision) (flutter/flutter#147266)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 303e71890897 to 5f17a779f19d (1 revision) (flutter/flutter#147264)
2024-04-23 72562119+tgucio@users.noreply.github.com Remove unneeded local variables and comments in Editable and RenderParagraph (flutter/flutter#146843)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for sliver_animated_opacity.0.dart API example. (flutter/flutter#146722)
2024-04-23 50643541+Mairramer@users.noreply.github.com Adds AutovalidateMode.onFocusChange to Form and FormField (flutter/flutter#140962)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b686508a1dbf to 303e71890897 (4 revisions) (flutter/flutter#147262)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from f23cc4dda1ad to b686508a1dbf (4 revisions) (flutter/flutter#147258)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for focus_node.0.dart API example. (flutter/flutter#146943)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 066953b74042 to f23cc4dda1ad (3 revisions) (flutter/flutter#147255)
2024-04-23 103135467+sealesj@users.noreply.github.com Refactor framework + test harness tests (flutter/flutter#146213)
2024-04-23 tessertaha@gmail.com Fix chips delete icon override the default icon size and ignores `IconTheme` from the chip property and `ChipThemeData` (flutter/flutter#146509)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from f794e6719d3c to 066953b74042 (3 revisions) (flutter/flutter#147248)
2024-04-23 82336674+gilnobrega@users.noreply.github.com Fix frozen `StretchingOverscrollIndicator` animation (flutter/flutter#147195)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for animated_align.0.dart API example. (flutter/flutter#146719)
2024-04-23 choi88andys@gmail.com Fix typos related to Navigator (flutter/flutter#147221)
2024-04-23 32538273+ValentinVignal@users.noreply.github.com Fix memory leak in switch painter (flutter/flutter#147228)
2024-04-23 sokolovskyi.konstantin@gmail.com Add test for animated_positioned.0.dart API example. (flutter/flutter#146720)
2024-04-23 katelovett@google.com Update icon tree shaker to allow system font fallback (flutter/flutter#147202)
2024-04-23 nate.w5687@gmail.com `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#146293)
2024-04-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 79f49954cce8 to f794e6719d3c (1 revision) (flutter/flutter#147241)
2024-04-23 engine-flutter-autoroll@skia.org 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 camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com 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
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing overlayColor property in styleFrom methods
2 participants