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

Implement switch expressions in examples/ and animation/ #139882

Merged
merged 1 commit into from Dec 11, 2023

Conversation

nate-thegrate
Copy link
Member

@nate-thegrate nate-thegrate commented Dec 10, 2023

Thanks so much for approving the previous PR (#139048) a couple weeks ago!

This one is the same, except it's covering files in examples/ and packages/flutter/lib/src/animation/.

(solving issue #136139)

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
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 "@text-exemption-reviewers" 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. a: animation Animation APIs d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels Dec 10, 2023
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 11, 2023
@auto-submit auto-submit bot merged commit 140f5ee into flutter:master Dec 11, 2023
66 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 13, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 13, 2023
Roll Flutter from 97190973d6f5 to 11a9cb7029d7 (32 revisions)

flutter/flutter@9719097...11a9cb7

2023-12-13 ian@hixie.ch Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal (flutter/flutter#139549)
2023-12-12 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.9 to 2.22.10 (flutter/flutter#140003)
2023-12-12 34871572+gmackall@users.noreply.github.com Allow plugins to use compileSdkPreview (flutter/flutter#131901)
2023-12-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#139995)
2023-12-12 15619084+vashworth@users.noreply.github.com Select simulator runtime for tests based on Xcode's preferred runtime build (flutter/flutter#139919)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0c527aa1a215 to 9039ac78cf03 (1 revision) (flutter/flutter#139992)
2023-12-12 pateltirth454@gmail.com [Docs] Added missing `CupertinoApp.showSemanticsDebugger` (flutter/flutter#139913)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 444281eb5c7c to 0c527aa1a215 (2 revisions) (flutter/flutter#139985)
2023-12-12 jason-simmons@users.noreply.github.com Update Gallery lockfiles for the new version of the video_player plugin (flutter/flutter#139832)
2023-12-12 engine-flutter-autoroll@skia.org Roll Packages from cb6dbcd to 80aa46a (5 revisions) (flutter/flutter#139982)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3b77b1b7b42f to 444281eb5c7c (1 revision) (flutter/flutter#139979)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from f8e87ed193f5 to 3b77b1b7b42f (1 revision) (flutter/flutter#139977)
2023-12-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#139969)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4102c7daf1d3 to f8e87ed193f5 (3 revisions) (flutter/flutter#139963)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 95dfb1d4ac75 to 4102c7daf1d3 (1 revision) (flutter/flutter#139961)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 40bfd2dc1519 to 95dfb1d4ac75 (1 revision) (flutter/flutter#139959)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 061ae7023f10 to 40bfd2dc1519 (2 revisions) (flutter/flutter#139958)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 75cfb050cd9a to 061ae7023f10 (1 revision) (flutter/flutter#139955)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 362d0cb3ab27 to 75cfb050cd9a (1 revision) (flutter/flutter#139954)
2023-12-12 gspencergoog@users.noreply.github.com Fix dayPeriodColor handling of non-MaterialStateColors (flutter/flutter#139845)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from ea1a3069e057 to 362d0cb3ab27 (1 revision) (flutter/flutter#139951)
2023-12-12 xilaizhang@google.com [github actions] Automate Flutter Chery Picks (flutter/flutter#139524)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from d001419b436e to ea1a3069e057 (5 revisions) (flutter/flutter#139948)
2023-12-12 christopherfujino@gmail.com [flutter_tools] catch SocketException writing to ios-deploy stdin (flutter/flutter#139784)
2023-12-11 chillers@google.com [ci.yaml] Add missing ci.yaml to runIf of android hot reload tests (flutter/flutter#139932)
2023-12-11 christopherfujino@gmail.com make the tar c command in prepare_package.dart verbose (flutter/flutter#139687)
2023-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5c1f13e1e535 to d001419b436e (4 revisions) (flutter/flutter#139941)
2023-12-11 timmaffett@gmail.com fix typo of 'not' instead of 'now' for `useInheritedMediaQuery`  (flutter/flutter#139940)
2023-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4c309195b79d to 5c1f13e1e535 (2 revisions) (flutter/flutter#139939)
2023-12-11 nathan.wilson1232@gmail.com Implement `switch` expressions in `examples/` and `animation/` (flutter/flutter#139882)
2023-12-11 pateltirth454@gmail.com Renamed `appbar` to `app_bar` directory in API Examples Tests (flutter/flutter#139922)
2023-12-11 gspencergoog@users.noreply.github.com Deprecate `RawKeyEvent`, `RawKeyboard`, et al. (flutter/flutter#136677)

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 dit@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
...
foxtrotravi pushed a commit to foxtrotravi/packages that referenced this pull request Dec 14, 2023
…r#5665)

Roll Flutter from 97190973d6f5 to 11a9cb7029d7 (32 revisions)

flutter/flutter@9719097...11a9cb7

2023-12-13 ian@hixie.ch Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal (flutter/flutter#139549)
2023-12-12 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.9 to 2.22.10 (flutter/flutter#140003)
2023-12-12 34871572+gmackall@users.noreply.github.com Allow plugins to use compileSdkPreview (flutter/flutter#131901)
2023-12-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#139995)
2023-12-12 15619084+vashworth@users.noreply.github.com Select simulator runtime for tests based on Xcode's preferred runtime build (flutter/flutter#139919)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0c527aa1a215 to 9039ac78cf03 (1 revision) (flutter/flutter#139992)
2023-12-12 pateltirth454@gmail.com [Docs] Added missing `CupertinoApp.showSemanticsDebugger` (flutter/flutter#139913)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 444281eb5c7c to 0c527aa1a215 (2 revisions) (flutter/flutter#139985)
2023-12-12 jason-simmons@users.noreply.github.com Update Gallery lockfiles for the new version of the video_player plugin (flutter/flutter#139832)
2023-12-12 engine-flutter-autoroll@skia.org Roll Packages from cb6dbcd to 80aa46a (5 revisions) (flutter/flutter#139982)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3b77b1b7b42f to 444281eb5c7c (1 revision) (flutter/flutter#139979)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from f8e87ed193f5 to 3b77b1b7b42f (1 revision) (flutter/flutter#139977)
2023-12-12 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#139969)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4102c7daf1d3 to f8e87ed193f5 (3 revisions) (flutter/flutter#139963)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 95dfb1d4ac75 to 4102c7daf1d3 (1 revision) (flutter/flutter#139961)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 40bfd2dc1519 to 95dfb1d4ac75 (1 revision) (flutter/flutter#139959)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 061ae7023f10 to 40bfd2dc1519 (2 revisions) (flutter/flutter#139958)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 75cfb050cd9a to 061ae7023f10 (1 revision) (flutter/flutter#139955)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 362d0cb3ab27 to 75cfb050cd9a (1 revision) (flutter/flutter#139954)
2023-12-12 gspencergoog@users.noreply.github.com Fix dayPeriodColor handling of non-MaterialStateColors (flutter/flutter#139845)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from ea1a3069e057 to 362d0cb3ab27 (1 revision) (flutter/flutter#139951)
2023-12-12 xilaizhang@google.com [github actions] Automate Flutter Chery Picks (flutter/flutter#139524)
2023-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from d001419b436e to ea1a3069e057 (5 revisions) (flutter/flutter#139948)
2023-12-12 christopherfujino@gmail.com [flutter_tools] catch SocketException writing to ios-deploy stdin (flutter/flutter#139784)
2023-12-11 chillers@google.com [ci.yaml] Add missing ci.yaml to runIf of android hot reload tests (flutter/flutter#139932)
2023-12-11 christopherfujino@gmail.com make the tar c command in prepare_package.dart verbose (flutter/flutter#139687)
2023-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5c1f13e1e535 to d001419b436e (4 revisions) (flutter/flutter#139941)
2023-12-11 timmaffett@gmail.com fix typo of 'not' instead of 'now' for `useInheritedMediaQuery`  (flutter/flutter#139940)
2023-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4c309195b79d to 5c1f13e1e535 (2 revisions) (flutter/flutter#139939)
2023-12-11 nathan.wilson1232@gmail.com Implement `switch` expressions in `examples/` and `animation/` (flutter/flutter#139882)
2023-12-11 pateltirth454@gmail.com Renamed `appbar` to `app_bar` directory in API Examples Tests (flutter/flutter#139922)
2023-12-11 gspencergoog@users.noreply.github.com Deprecate `RawKeyEvent`, `RawKeyboard`, et al. (flutter/flutter#136677)

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 dit@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
...
Michal-MK pushed a commit to Michal-MK/flutter that referenced this pull request Jan 8, 2024
…er#139882)

Thanks so much for approving the previous PR (flutter#139048) a couple weeks ago!

This one is the same, except it's covering files in `examples/` and `packages/flutter/lib/src/animation/`.

(solving issue flutter#136139)
Markzipan pushed a commit to Markzipan/flutter that referenced this pull request Jan 9, 2024
…er#139882)

Thanks so much for approving the previous PR (flutter#139048) a couple weeks ago!

This one is the same, except it's covering files in `examples/` and `packages/flutter/lib/src/animation/`.

(solving issue flutter#136139)
@nate-thegrate nate-thegrate deleted the switch-expressions-2 branch January 26, 2024 00:32
auto-submit bot pushed a commit that referenced this pull request Jan 29, 2024
…142279)

This PR is the fourth step in the journey to solve issue #136139 and make the entire Flutter repo more readable.

(previous pull requests: #139048, #139882, #141591)

This one is covering files in `packages/flutter/lib/src/foundation/` and `packages/flutter/lib/src/material/`.  
The `material/` directory is pretty big though, so for now I just did the files that start with `a`, `b`, and `c`.
auto-submit bot pushed a commit that referenced this pull request Feb 1, 2024
This PR is step 5 in the journey to solve issue #136139 and make the entire Flutter repo more readable.

(previous pull requests: #139048, #139882, #141591, #142279)

The current focus is on `packages/flutter/lib/src/material/`.  
The previous PR covered files in this directory starting with `a`, `b`, and `c`; this pull request is for `d` through `m`.
auto-submit bot pushed a commit that referenced this pull request Feb 9, 2024
This PR is the 6�ʰ step in the journey to solve issue #136139 and make the entire Flutter repo more readable.

(previous pull requests: #139048, #139882, #141591, #142279, #142634)

The current focus is on `packages/flutter/lib/src/material/`. The previous 2 PRs covered files in this directory starting with letters `a-m`; this one takes care of everything else.
auto-submit bot pushed a commit that referenced this pull request Feb 13, 2024
This PR is the 7�ʰ step in the journey to solve issue #136139 and make the entire Flutter repo more readable.

(previous pull requests: #139048, #139882, #141591, #142279, #142634, #142793)

This pull request covers everything in `packages/flutter/lib/src/widgets/`. Most of it should be really straightforward, but there was some refactoring in the `getOffsetToReveal()` function in `two_dimensional_viewport.dart`. I'll add some comments to describe those changes.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
auto-submit bot pushed a commit that referenced this pull request Feb 16, 2024
…143496)

This PR is the 8�ʰ step in the journey to solve issue #136139 and make the entire Flutter repo more readable.

(previous pull requests: #139048, #139882, #141591, #142279, #142634, #142793, #143293)

I did a pass through all of `packages/flutter/lib/src/` and found a whole bunch of `switch` statements to improve: most of them were really simple, but many involved some thorough refactoring.

This pull request is just the complicated stuff. � I'll make comments to describe the changes, and then in the future there will be another PR (and it'll be much easier to review than this one).
auto-submit bot pushed a commit that referenced this pull request Feb 20, 2024
…143634)

This PR is the 9�ʰ step in the journey to solve issue #136139 and make the entire Flutter repo more readable.

(previous pull requests: #139048, #139882, #141591, #142279, #142634, #142793, #143293, #143496)

I did a pass through all of `packages/flutter/lib/src/` and found an abundance of `switch` statements to improve. Whereas #143496 focused on in-depth refactoring, this PR is full of simple, straightforward changes. (I ended up making some more complicated changes in `rendering/` and will file those separately after this PR is done.)
auto-submit bot pushed a commit that referenced this pull request Mar 29, 2024
This pull request is step 12 in the journey to make this entire repository more readable.

(previous PRs: #139048, #139882, #141591, #142279, #142634, #142793, #143293, #143496, #143634, #143812, #144580)

We're getting close to the end! �
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: animation Animation APIs autosubmit Merge PR when tree becomes green via auto submit App d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants