Uh oh!
There was an error while loading. Please reload this page.
[go_router] Add documentation to some methods in matching.dart - #3462
Conversation
ValentinVignal
commented
Mar 15, 2023
I would think this is a version exempt ? |
| /// the full path pattern that matches the uri. | ||
| /// /family/:fid/person/:pid | ||
| /// the full path pattern that matches the uri. For example: |
There was a problem hiding this comment.
| /// the full path pattern that matches the uri. For example: | |
| /// The full path pattern that matches the uri. | |
| /// | |
| /// For example: |
| /// Returns the list of `RouteMatch` corresponding to the given [loc]. For | ||
| /// example, for a given [loc] `/a/b/c/d`, this function will return the list of | ||
| /// [RouteBase] `[GoRouteA(), GoRouterB(), GoRouteC(), GoRouterD()]`. |
There was a problem hiding this comment.
| /// Returns the list of `RouteMatch` corresponding to the given [loc]. For | |
| /// example, for a given [loc]`/a/b/c/d`, this function will return the list of | |
| /// [RouteBase]`[GoRouteA(), GoRouterB(), GoRouteC(), GoRouterD()]`. | |
| /// Returns the list of `RouteMatch` corresponding to the given [loc]. | |
| /// | |
| /// For example, for a given [loc]`/a/b/c/d`, this function will return the list of | |
| /// [RouteBase]`[GoRouteA(), GoRouterB(), GoRouteC(), GoRouterD()]`. |
| /// Generate the full path (ex: `'/family/:fid/person/:pid'`) of a list of | ||
| /// [RouteMatch]. | ||
| /// | ||
| /// This methods considers that [matches] is ordered accorresponding to how |
There was a problem hiding this comment.
I can't quite parse this sentence
There was a problem hiding this comment.
I hope docs: Better documentation makes it clearer
| /// | ||
| /// - [loc] is the complete URL to match (without the query parameters). For | ||
| /// example, for the URL `/a/b?c=0`, [loc] will be `/a/b`. | ||
| /// - [restBloc] is the remaining part of the URL to match while [parentBloc] is |
ValentinVignal
commented
Mar 16, 2023
Should the label "override: no versioning needed" be added to this PR ? Or should I create a new version? |
chunhtai
left a comment
There was a problem hiding this comment.
LGTM, just some more nits
| static RouteMatchList empty = | ||
| RouteMatchList(<RouteMatch>[], Uri.parse(''), const <String, String>{}); | ||
| /// Generate the full path (ex: `'/family/:fid/person/:pid'`) of a list of |
There was a problem hiding this comment.
| /// Generate the full path (ex: `'/family/:fid/person/:pid'`) of a list of | |
| /// Generates the full path (ex: `'/family/:fid/person/:pid'`) of a list of |
| /// Generate the full path (ex: `'/family/:fid/person/:pid'`) of a list of | ||
| /// [RouteMatch]. | ||
| /// | ||
| /// This methods considers that [matches]'s elements verify the go route |
There was a problem hiding this comment.
Maybe:
The [matches] must be the in same order of how GoRoutes are matched.
For example, if the routes structure is ...
| } | ||
| } | ||
| /// Returns the list of `RouteMatch` corresponding to the given [loc]. |
There was a problem hiding this comment.
The input parameters should be in quote instead of square bracket.
| /// Returns the list of `RouteMatch` corresponding to the given [loc]. | |
| /// Returns the list of `RouteMatch` corresponding to the given `loc`. |
| /// Returns the list of `RouteMatch` corresponding to the given [loc]. | ||
| /// | ||
| /// For example, for a given [loc] `/a/b/c/d`, this function will return the |
chunhtai
commented
Mar 16, 2023
cc @johnpryan for secondary review |
…er#3462) [go_router] Add documentation to some methods in matching.dart
…er#3462) [go_router] Add documentation to some methods in matching.dart
…er#3462) [go_router] Add documentation to some methods in matching.dart
I was investigating how to fixflutter/flutter#113032 (I will soon public a design proposition as I think the entire
RouteMatchListstructure needs to be changed from a list to a tree). It is a bit hard to understand what each method was supposed to do so I added some documentation to help future contributors.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.