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
refactor if
chains and ==
with enum values
#144903
Labels
c: proposal
A detailed proposal for a change to Flutter
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
r: fixed
Issue is closed as already fixed in a newer version
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Comments
danagbemava-nc
added
in triage
Presently being triaged by the triage team
framework
flutter/packages/flutter repository. See also f: labels.
c: proposal
A detailed proposal for a change to Flutter
team-framework
Owned by Framework team
and removed
in triage
Presently being triaged by the triage team
labels
Mar 11, 2024
danagbemava-nc
changed the title
refactor Mar 11, 2024
if
chains and ==
with enum valuesif
chains and ==
with enum values
auto-submit bot
pushed a commit
that referenced
this issue
Mar 11, 2024
Based on issue #144903, this PR aims to bring the codebase more in line with the [Flutter repo style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-using-if-chains-or--or--with-enum-values): > #### Avoid using `if` chains or `?:` or `==` with enum values <br> This change unfortunately increases the total line length, but it also improves readability.
goderbauer
added
P3
Issues that are less important to the Flutter project
triaged-framework
Triaged by Framework team
labels
Mar 12, 2024
auto-submit bot
pushed a commit
that referenced
this issue
Mar 22, 2024
This pull request refactors if-statements into switch expressions, as part of the effort to solve issue #144903. Making changes beyond just swapping syntax is more difficult (and also more difficult to review, I apologize), but much more satisfying too.
auto-submit bot
pushed a commit
that referenced
this issue
Apr 23, 2024
…46293) Based on issue #144903, this pull request aims to bring the codebase more in line with the [Flutter repo style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-using-if-chains-or--or--with-enum-values): > ### Avoid using `if` chains or `?:` or `==` with enum values
This was referenced Apr 27, 2024
nate-thegrate
added a commit
that referenced
this issue
May 10, 2024
danagbemava-nc
added
the
r: fixed
Issue is closed as already fixed in a newer version
label
May 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c: proposal
A detailed proposal for a change to Flutter
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
r: fixed
Issue is closed as already fixed in a newer version
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
From the Flutter repo style guide:
Example (toggle_buttons.dart):
Performing this refactor would increase the total line length, but in my opinion the improved readability is worth it.
The text was updated successfully, but these errors were encountered: