Skip to content

Conversation

@paldepind
Copy link
Contributor

destructiveRed is an alias for systemRed, but, in the definition, the precise type information is lost.

This PR gives destructiveRed the type CupertinoDynamicColor (and not the superclass Color) like all the other colors defined in this file.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository labels Jan 11, 2024
///
/// This is SystemRed in the iOS palette.
static const Color destructiveRed = systemRed;
static const CupertinoDynamicColor destructiveRed = systemRed;
Copy link
Contributor

Choose a reason for hiding this comment

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

Pinging @LongCatIsLooong, do you know if leaving this as a Color type rather than a CupertinoDynamicColor was intended? It's a PR from ages ago, but it looks like the change to not just using a static color was here.

Copy link
Contributor

@LongCatIsLooong LongCatIsLooong left a comment

Choose a reason for hiding this comment

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

The change LGTM. The typing was probably an oversight, since this is an abstract final class the static type should be as specific as possible.

I don't know if there's an easy way to test this change. You may need a test exemption for this PR (https://github.com/flutter/flutter/wiki/Tree-hygiene#tests)

@MitchellGoodwin
Copy link
Contributor

@paldepind would you be able to rebase this PR? That may get the Google testing unstuck.

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 6, 2024
@auto-submit auto-submit bot merged commit 2911bfb into flutter:master Feb 6, 2024
dumazy added a commit to dumazy/flutter that referenced this pull request Feb 7, 2024
* master: (32 commits)
  [reland] Add `AnimationStyle` to `showSnackBar` (flutter#143052)
  Run Mac x64 build tests in postsubmit only (flutter#142334)
  Copy the flutter version JSON file into the simulated Flutter SDK used by update_packages (flutter#143035)
  Mark `Windows_android hot_mode_dev_cycle_win__benchmark` as no longer flaky (flutter#143016)
  Dispose precached image info (flutter#143017)
  Instrument CurvedAnimation. (flutter#143007)
  Update _goldens_io.dart to generate failure images during a size mism… (flutter#142177)
  Reverts "Activate InkSparkle on CanvasKit" (flutter#143036)
  Activate InkSparkle on CanvasKit (flutter#138545)
  [Windows] Fix signed/unsigned int comparison (flutter#142341)
  Reverts "Move native assets to `isolated/` directory" (flutter#143027)
  Reverts "Roll Flutter Engine from 808886312e2b to 07cdaab7f531 (18 revisions)" (flutter#143025)
  Make destructiveRed a CupertinoDynamicColor (flutter#141364)
  Move native assets to `isolated/` directory (flutter#142709)
  Roll Flutter Engine from 808886312e2b to 07cdaab7f531 (18 revisions) (flutter#143005)
  Fix CupertinoPageScaffold resizeToAvoidBottomInset (flutter#142776)
  Reverts "Add `AnimationStyle` to `showSnackBar`" (flutter#143001)
  Material 3 - Tab indicator stretch animation (flutter#141954)
  Add `AnimationStyle` to `showSnackBar` (flutter#142825)
  Roll Packages from ae3494d to 1a5a7ce (2 revisions) (flutter#142985)
  ...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 7, 2024
flutter/flutter@e6ba809...8431cae

2024-02-07 [email protected] Roll Flutter Engine from 1ac6beb8a3c2 to 6807342305e4 (6 revisions) (flutter/flutter#143082)
2024-02-07 [email protected] Manual roll Flutter Engine from 808886312e2b to 1ac6beb8a3c2 (22 revisions) (flutter/flutter#143039)
2024-02-07 [email protected] Roll Packages from 1a5a7ce to e4ea6bf (4 revisions) (flutter/flutter#143076)
2024-02-07 [email protected] Fix M3 text field height + initial step for input decorator M3 test migration (flutter/flutter#142981)
2024-02-07 [email protected] [reland] Add `AnimationStyle` to `showSnackBar` (flutter/flutter#143052)
2024-02-07 [email protected] Run Mac x64 build tests in postsubmit only (flutter/flutter#142334)
2024-02-07 [email protected] Copy the flutter version JSON file into the simulated Flutter SDK used by update_packages (flutter/flutter#143035)
2024-02-07 [email protected] Mark `Windows_android hot_mode_dev_cycle_win__benchmark` as no longer flaky (flutter/flutter#143016)
2024-02-07 [email protected] Dispose precached image info (flutter/flutter#143017)
2024-02-07 [email protected] Instrument CurvedAnimation. (flutter/flutter#143007)
2024-02-07 [email protected] Update _goldens_io.dart to generate failure images during a size mismâ�¦ (flutter/flutter#142177)
2024-02-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Activate InkSparkle on CanvasKit" (flutter/flutter#143036)
2024-02-07 [email protected] Activate InkSparkle on CanvasKit (flutter/flutter#138545)
2024-02-07 [email protected] [Windows] Fix signed/unsigned int comparison (flutter/flutter#142341)
2024-02-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Move native assets to `isolated/` directory" (flutter/flutter#143027)
2024-02-06 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Flutter Engine from 808886312e2b to 07cdaab7f531 (18 revisions)" (flutter/flutter#143025)
2024-02-06 [email protected] Make destructiveRed a CupertinoDynamicColor (flutter/flutter#141364)
2024-02-06 [email protected] Move native assets to `isolated/` directory (flutter/flutter#142709)
2024-02-06 [email protected] Roll Flutter Engine from 808886312e2b to 07cdaab7f531 (18 revisions) (flutter/flutter#143005)
2024-02-06 [email protected] Fix CupertinoPageScaffold resizeToAvoidBottomInset (flutter/flutter#142776)
2024-02-06 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add `AnimationStyle` to `showSnackBar`" (flutter/flutter#143001)
2024-02-06 [email protected] Material 3 - Tab indicator stretch animation (flutter/flutter#141954)
2024-02-06 [email protected] Add `AnimationStyle` to `showSnackBar` (flutter/flutter#142825)

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 May 14, 2024
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: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants