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

Implementing switch expressions in flutter/test/ #144580

Merged
merged 5 commits into from
Mar 14, 2024

Conversation

nate-thegrate
Copy link
Member

This pull request is part of the effort to solve issue #136139 and make the Flutter repo more readable. After 10 successful PRs, all of flutter/lib/src/ is looking good, so it's on to flutter/test/!

No in-depth refactoring here: should be a pretty straightforward merge.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. f: cupertino flutter/packages/flutter/cupertino repository f: routes Navigator, Router, and related APIs. labels Mar 5, 2024
@nate-thegrate nate-thegrate marked this pull request as ready for review March 5, 2024 23:30
Comment on lines 483 to 484
Orientation.portrait => Scaffold(body: Container(), drawer: const Text('drawer')),
Orientation.landscape => Scaffold(body: Container(), appBar: AppBar()),
Copy link
Member

Choose a reason for hiding this comment

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

This was slightly nicer when the arguments to Scaffold were each on their own line, which is more Flutter-style.

Copy link
Member

Choose a reason for hiding this comment

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

(here and below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good—I think I'll just revert this file since I'm not a huge fan of multi-line switch expression values.

packages/flutter/test/widgets/text_selection_test.dart Outdated Show resolved Hide resolved
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

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks again for migrating this!

@justinmc justinmc merged commit 17a2735 into flutter:master Mar 14, 2024
64 checks passed
@nate-thegrate nate-thegrate deleted the switch-expressions-11 branch March 14, 2024 23:03
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2024
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! �
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
@nate-thegrate nate-thegrate added the refactor Improving readability/efficiency without behavioral changes label Jul 12, 2024
@nate-thegrate nate-thegrate added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. refactor Improving readability/efficiency without behavioral changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants