Skip to content

[google_identity_services_web] - Enhance maybeEnum to handle if enum value is not exist with a return of null.#9006

Closed
Hamza-Nasser wants to merge 5 commits intoflutter:mainfrom
Hamza-Nasser:fix166548
Closed

[google_identity_services_web] - Enhance maybeEnum to handle if enum value is not exist with a return of null.#9006
Hamza-Nasser wants to merge 5 commits intoflutter:mainfrom
Hamza-Nasser:fix166548

Conversation

@Hamza-Nasser
Copy link
Copy Markdown

@Hamza-Nasser Hamza-Nasser commented Apr 5, 2025

The old maybeEnum was throwing a transitive ArgumentError that is being thrown from the extension function EnumByName::byName if the string value does not match any, now it is returning null instead.
This PR also have a new test file for the maybeEnum function with different test cases.

Fixes flutter/flutter#166548

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@Hamza-Nasser Hamza-Nasser requested a review from ditman as a code owner April 5, 2025 11:24
@stuartmorgan-g stuartmorgan-g added the triage-web Should be looked at in web triage label Apr 16, 2025
@ditman
Copy link
Copy Markdown
Member

ditman commented Apr 22, 2025

Thanks for the fix! I would have landed this, but else beat you to the punch with this fix, here: #8999 (we should have assigned them the underlying issue, sorry!)

@ditman ditman closed this Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-web Should be looked at in web triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[gis_web] Make maybeEnum more robust.

3 participants