[go_router_builder] Support default value for Set, List and Iterable route parameters#3391
Merged
auto-submit[bot] merged 10 commits intoflutter:mainfrom Mar 16, 2023
Conversation
dab2e72 to
8f04735
Compare
chunhtai
reviewed
Mar 8, 2023
Contributor
chunhtai
left a comment
There was a problem hiding this comment.
The Code LGTM, can you add a test in example/test to make sure thing works as expected if navigate to the route with default value?
…le-parameters # Conflicts: # packages/go_router_builder/CHANGELOG.md
Contributor
Author
|
@chunhtai I added a test in test: Add a test in example with default values but I'm not very proud of it. Do you have a better idea? |
chunhtai
reviewed
Mar 9, 2023
| }); | ||
|
|
||
| testWidgets( | ||
| 'It should navigate to the iterable route with the its default values', |
Contributor
There was a problem hiding this comment.
Suggested change
| 'It should navigate to the iterable route with the its default values', | |
| 'It should navigate to the iterable route with its default values', |
| final Set<SportDetails> enumSetField; | ||
|
|
||
| @override | ||
| Widget build(BuildContext context, GoRouterState state) => BasePage<String>( |
Contributor
There was a problem hiding this comment.
Maybe build a widget that holds all these parameter as its property, and then you can use tester.widget<>(find.byType) to get the widget and then you can compare the value of each property in the widget.
Contributor
Author
There was a problem hiding this comment.
I've implemented it in test: Add better tests
…efault-values-with-iterable-parameters # Conflicts: # packages/go_router_builder/CHANGELOG.md # packages/go_router_builder/test/builder_test.dart # packages/go_router_builder/test/test_inputs/_go_router_builder_test_input.dart
…efault-values-with-iterable-parameters
Contributor
Author
|
@Hangyujin Is there anything I should do on this PR? |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 17, 2023
…nd `Iterable` route parameters (flutter/packages#3391)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 17, 2023
…nd `Iterable` route parameters (flutter/packages#3391)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 20, 2023
…nd `Iterable` route parameters (flutter/packages#3391)
tarrinneal
pushed a commit
to flutter/flutter
that referenced
this pull request
Mar 20, 2023
* 7636eb7 [go_router_builder] Support default value for `Set`, `List` and `Iterable` route parameters (flutter/packages#3391) * 26c95da [image_picker] Move HashSet construction within if-statement (flutter/packages#3448) * f5687b2 [image_picker] fix typos in comments (flutter/packages#3413) * 84afba7 [image_picker] Migrate Android to Pigeon (flutter/packages#3476) * 42927fc [image_picker]: Bump androidx.exifinterface:exifinterface from 1.3.3 to 1.3.6 in /packages/image_picker/image_picker_android/android (flutter/packages#3238) * 9a44bdf Require Dart SDK 2.14, because of using APIs. (flutter/packages#3468) * 12609a2 [ci] Clean up iOS simulators (flutter/packages#3458) * 9b136a9 [ci/tool] Add external dependency validation (flutter/packages#3466) * 11aab47 Manual roll Flutter from fb7e828 to 67e5f66 (8 revisions) (flutter/packages#3482) * 784291b Update goldens (flutter/packages#3442) * 43a42d1 [webview_flutter_android] Updates Dart and Java InstanceManagers (flutter/packages#3282) * d0de136 [camera] Reland android flip/change camera while recording (flutter/packages#3460) * 74fd094 [image_picker_android] Adjust file extension in FileUtils when it does not match its mime type (flutter/packages#3409) * d2f1d2d [flutter_adaptive_scaffold] : 🐛 [FIX] : Issue: 121135. (flutter/packages#3253) * 3d078b5 Roll Flutter from 67e5f66 to 53dfd23 (39 revisions) (flutter/packages#3484) * 3b3a09d [url_launcher] Convert iOS to Pigeon (flutter/packages#3481) * 80cd50a Roll Flutter from 53dfd23 to 6bd2b3c (17 revisions) (flutter/packages#3486) * 998bb29 [webview_flutter] Updates the README with the migration of `WebView.initialCookies` and Hybrid Composition on (flutter/packages#3470) * bbf86a7 Roll Flutter from 6bd2b3c to 3e4e092 (7 revisions) (flutter/packages#3490)
10 tasks
nploi
pushed a commit
to nploi/packages
that referenced
this pull request
Jul 16, 2023
…able` route parameters (flutter#3391) [go_router_builder] Support default value for `Set`, `List` and `Iterable` route parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: flutter/flutter#122003
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.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.