Implementing switch expressions throughout the repo.#136140
Implementing switch expressions throughout the repo.#136140nate-thegrate wants to merge 28 commits intoflutter:masterfrom
switch expressions throughout the repo.#136140Conversation
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Co-authored-by: Mateus Felipe C. C. Pinto <[email protected]>
Co-authored-by: Mateus Felipe C. C. Pinto <[email protected]>
|
All checks have passed! 🙌 @stuartmorgan @mateusfccp would one of you be able to approve the PR? |
I'm only a regular contributor |
| ServiceWorkerTestType.blockedServiceWorkers => 'index_with_blocked_service_workers.html', | ||
| ServiceWorkerTestType.withFlutterJs => 'index_with_flutterjs.html', | ||
| ServiceWorkerTestType.withoutFlutterJs => 'index_without_flutterjs.html', | ||
| ServiceWorkerTestType.withFlutterJsShort => 'index_with_flutterjs_short.html', | ||
| ServiceWorkerTestType.withFlutterJsEntrypointLoadedEvent => 'index_with_flutterjs_entrypoint_loaded.html', | ||
| ServiceWorkerTestType.withFlutterJsTrustedTypesOn => 'index_with_flutterjs_el_tt_on.html', | ||
| ServiceWorkerTestType.withFlutterJsCustomServiceWorkerVersion => 'index_with_flutterjs_custom_sw_version.html', | ||
| ServiceWorkerTestType.generatedEntrypoint => 'generated_entrypoint.html', |
There was a problem hiding this comment.
Is this kind of alignment desired? @stuartmorgan
|
Please don't keep pinging me here; my comment was just a drive-by flagging of a style guide violation, not a review. This PR will go through the normal framework PR review process and be assigned to the right person (not me) to make a decision about making a significant style change to the framework code. |
|
@nate-thegrate I think this change is too large to effectively review. I would recommend breaking it up into many smaller PRs (maybe 5 libraries per PR?). |
I previously made a PR (#136140) that used `switch` expressions to make some parts of the Flutter codebase easier to understand. It was assigned to the framework team, and @christopherfujino let me know that it was too large to effectively review and recommended breaking it up into smaller pull requests. Here's a PR that only targets files in the `dev/` directory. Hopefully this will be easier to work with! (solves issue #136139)
I previously made a PR (flutter#136140) that used `switch` expressions to make some parts of the Flutter codebase easier to understand. It was assigned to the framework team, and @christopherfujino let me know that it was too large to effectively review and recommended breaking it up into smaller pull requests. Here's a PR that only targets files in the `dev/` directory. Hopefully this will be easier to work with! (solves issue flutter#136139)
Example:
button_theme.dartbefore:
after:
(solves issue #136139)
Pre-launch Checklist
switchexpressions as well.If you need help, consider asking for advice on the #hackers-new channel on Discord.