[go_router_builder]: Handle invaild params#8405
[go_router_builder]: Handle invaild params#8405auto-submit[bot] merged 21 commits intoflutter:mainfrom CaoGiaHieu-dev:main
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
chunhtai
left a comment
There was a problem hiding this comment.
I think the solution sounds good to me, left some comments
| static PersonRoute _fromState(GoRouterState state) => PersonRoute( | ||
| state.pathParameters['fid']!, | ||
| int.parse(state.pathParameters['pid']!), | ||
| int.parse(state.pathParameters['pid']!.toString())!, |
There was a problem hiding this comment.
can you revert the format change?
There was a problem hiding this comment.
currently i cannot revert it because it was using same code gen with tryPrase case .
i will look around and try to resolve this
packages/go_router_builder/test_inputs/iterable_with_default_value.dart.expect
Outdated
Show resolved
Hide resolved
| param: state.uri.queryParametersAll['param']?.map(int.parse) ?? | ||
| param: (state.uri.queryParametersAll['param'] | ||
| ?.map(int.parse) | ||
| ?.where((e) => e != null) |
There was a problem hiding this comment.
I think ? after the first ?.map may cause lint error as it is not needed?
There was a problem hiding this comment.
it wont because it not different with previous code . the only thing different is i wrap it to () and add ?.where((e) => e != null)
There was a problem hiding this comment.
I meant shouldn't this be
(state.uri.queryParametersAll['param']
?.map(int.parse)
.where((e) => e != null)
There was a problem hiding this comment.
@CaoGiaHieu-dev it looks like code here is still not updated. chaining ?. is not needed, see dart doc here: https://dart.dev/null-safety/understanding-null-safety#smarter-null-aware-methods
you nee to update [type_helpers.dart] and regenerate the expect file here
There was a problem hiding this comment.
@hannah-hyj i just updated . can you check it again
chunhtai
left a comment
There was a problem hiding this comment.
LGTM except for the comment #8405 (comment)
Thank for your comment . i just updated |
flutter/packages@c44c228...01d3d5c 2025-02-27 engine-flutter-autoroll@skia.org Manual roll Flutter from 043b719 to 1659206 (19 revisions) (flutter/packages#8728) 2025-02-27 stuartmorgan@google.com Manual roll Flutter from 911aa75 to 043b719 (flutter/packages#8693) 2025-02-26 magder@google.com Dependabot to update major and minor versions of test dependencies, ignore patch (flutter/packages#8712) 2025-02-26 reidbaker@google.com [local_auth] Update to use flutter.targetSdkVersion (flutter/packages#8695) 2025-02-26 57854043+CaoGiaHieu-dev@users.noreply.github.com [go_router_builder]: Handle invaild params (flutter/packages#8405) 2025-02-26 stuartmorgan@google.com [pigeon] Timestamp test steps in CI (flutter/packages#8716) 2025-02-26 43054281+camsim99@users.noreply.github.com [camera_android_camerax] Fix 90°-off preview rotation (flutter/packages#8629) 2025-02-26 108667553+aprzedecki@users.noreply.github.com [go_router] Secured empty matches in canPop (flutter/packages#8557) 2025-02-26 reidbaker@google.com [tool] Update targetsdk version to 35 from 32 (flutter/packages#8694) 2025-02-26 stuartmorgan@google.com [various] Bump androidx.test:core to 1.4.0 (flutter/packages#8710) 2025-02-26 stuartmorgan@google.com [camera] Disable flaky tests (flutter/packages#8708) 2025-02-26 mdebbar@google.com [url_launcher][web] Prevent browser from navigating when followLink isn't called (flutter/packages#8675) 2025-02-26 stuartmorgan@google.com [various] Remove plugin-level `integration_test` dependencies (flutter/packages#8711) 2025-02-26 stuartmorgan@google.com [ci] Lengthen custom tests timeout (flutter/packages#8715) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ed to the parameter type 'String' because 'String?' ` on path and query params (#8737) Impact of this pr #8405 , params with required enum cannot parse Fixed : flutter/flutter#164354
Fixed handling of invalid parameters Fix: flutter/flutter#160894 (comment)
…ed to the parameter type 'String' because 'String?' ` on path and query params (flutter#8737) Impact of this pr flutter#8405 , params with required enum cannot parse Fixed : flutter/flutter#164354
Fixed handling of invalid parameters Fix: flutter/flutter#160894 (comment)
…ed to the parameter type 'String' because 'String?' ` on path and query params (flutter#8737) Impact of this pr flutter#8405 , params with required enum cannot parse Fixed : flutter/flutter#164354
Fixed handling of invalid parameters
Fix: flutter/flutter#160894 (comment)
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.