-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[go_router] Add documentation to some methods in matching.dart #3462
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
Changes from 2 commits
204bd9e
5e4338a
f12243a
d3d689e
b8f25b7
1034adf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,6 +48,8 @@ class RouteMatcher { | |||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| /// The list of [RouteMatch] objects. | ||||||||||||||||
| /// | ||||||||||||||||
| /// This corresponds to the GoRouter's history. | ||||||||||||||||
| class RouteMatchList { | ||||||||||||||||
| /// RouteMatchList constructor. | ||||||||||||||||
| RouteMatchList(List<RouteMatch> matches, this._uri, this.pathParameters) | ||||||||||||||||
|
|
@@ -58,6 +60,11 @@ class RouteMatchList { | |||||||||||||||
| static RouteMatchList empty = | ||||||||||||||||
| RouteMatchList(<RouteMatch>[], Uri.parse(''), const <String, String>{}); | ||||||||||||||||
|
|
||||||||||||||||
| /// Generate the full path (ex: `'/family/:fid/person/:pid'`) of a list of | ||||||||||||||||
| /// [RouteMatch]. | ||||||||||||||||
| /// | ||||||||||||||||
| /// This methods considers that [matches] is ordered accorresponding to how | ||||||||||||||||
|
||||||||||||||||
| /// the routes are given to `GoRouter`. | ||||||||||||||||
| static String _generateFullPath(Iterable<RouteMatch> matches) { | ||||||||||||||||
| final StringBuffer buffer = StringBuffer(); | ||||||||||||||||
| bool addsSlash = false; | ||||||||||||||||
|
|
@@ -76,8 +83,11 @@ class RouteMatchList { | |||||||||||||||
|
|
||||||||||||||||
| final List<RouteMatch> _matches; | ||||||||||||||||
|
|
||||||||||||||||
| /// the full path pattern that matches the uri. | ||||||||||||||||
| /// /family/:fid/person/:pid | ||||||||||||||||
| /// the full path pattern that matches the uri. For example: | ||||||||||||||||
|
||||||||||||||||
| /// the full path pattern that matches the uri. For example: | |
| /// The full path pattern that matches the uri. | |
| /// | |
| /// For example: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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()]`. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restLoc and parenetLoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.