Skip to content

Implementing switch expressions in flutter/test/ - #144580

Merged
justinmc merged 5 commits into
flutter:masterfrom
nate-thegrate:switch-expressions-11
Mar 14, 2024
Merged

justinmc merged 5 commits into
flutter:masterfrom
nate-thegrate:switch-expressions-11

Conversation

@nate-thegrate

Copy link
Copy Markdown
Contributor

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. p: material_ui material_ui package in flutter/packages f: scrolling Viewports, list views, slivers, etc. p: cupertino_ui cupertino_ui package in flutter/packages 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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.

Comment thread packages/flutter/test/widgets/text_selection_test.dart Outdated

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

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
@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: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. p: cupertino_ui cupertino_ui package in flutter/packages p: material_ui material_ui package in flutter/packages refactor Improving readability/efficiency without behavioral changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants