UriDeepLinkMatcher
Represents a deep link that can be deep linked into when matched with a DeepLinkRequest
If the matcher constructed with this overload matches a DeepLinkRequest, the provided serializer will be used to instantiate the deep link target's navigation key.
T The type of the navigation key associated with this deep link.
Supported Path patterns and extracted argument examples
Exact Path
Pattern:
www.example.com/usersArguments:
https://www.example.com/usersExtracted values: Extracts no arguments.
Single placeholder
Pattern:
www.example.com/users/{id}Arguments: Extracts argument
["id"].Request:
https://www.example.com/users/123Extracted values: Maps "id" to "123".
Multiple placeholders
Pattern:
www.example.com/users/{first}-{last}Arguments: Extracts arguments "first", "last".
Request:
https://www.example.com/users/john-doeExtracted values: Maps "first" to "john" and "last" to "doe".
Wildcard
Pattern:
www.example.com/users/.*Arguments: Extracts no arguments.
Mixed literal and placeholder
Pattern:
www.example.com/users/user_{id}Arguments: Extracts argument "id".
Request:
https://www.example.com/users/user_123Extracted values: Maps "id" to "123".
Empty String
Pattern:
www.example.com/users/{id}/profileArguments: Extracts argument "id".
Request:
www.example.com/users//profileExtracted values: Maps "id" to "".
Supported Query Pattern Types and Examples
Named Parameter
Pattern:
?name={name}Arguments: Extracts argument "name".
Request:
?name=johnExtracted values: Maps "name" to "john".
Unnamed Parameter
Pattern:
?{rawQuery}Arguments: Extracts argument "rawQuery".
Request:
?anything&elseExtracted values: Maps "rawQuery" to "anything", "else".
Partial Literal Matching
Pattern:
?type=user_{id}Arguments: Extracts argument "id".
Request:
?type=user_123Extracted values: Maps "id" to "123".
Multiple Placeholders in One Parameter
Pattern:
?name={first}_{last}Arguments: Extracts arguments "first", "last".
Request:
?name=john_doeExtracted values: Maps "first" to "john" and "last" to "doe".
Collection Parameters
Pattern:
?list={list}Arguments: Extracts argument "list".
Request:
?list=10&list=20Extracted values: Maps "list" to "10", "20".
Wildcard Matching
Pattern:
?type=user_.*Arguments: Extracts argument "type".
Request:
?type=user_adminExtracted values: Maps "type" to "admin".
Mixed Named and Unnamed Parameters
Pattern:
?user={name}&{other}Arguments: Extracts arguments "name", "other".
Request:
?user=john&somethingExtracted values: Maps "name" to "john" and "other" to "something".
Unsupported Query Pattern Types and Examples
Repeated Parameter Names in Pattern
Pattern:
www.example.com?name={first}&name={last}Extra Parameters
Pattern:
?name={name}Arguments: Extracts arguments "name".
Request:
?name=john&city=someCityExtracted values: Maps "name" to "john". // city is ignored
Multiple Unnamed Parameters in Pattern
Pattern:
?{arg1}&{arg2}
Supported Fragment Pattern Types and Examples
Static Fragment
Pattern:
#section1Arguments: None
Request:
#section1Extracted values: None extracted.
Single Placeholder
Pattern:
#section_{id}Arguments: Extracts argument "id".
Request:
#section_123Extracted values: Maps "id" to "123".
Wildcard
Pattern:
#section_.*Arguments: Extracts argument "section".
Request:
#section_123Extracted values: Maps "section" to "123".
Parameters
The DeepLinkUri containing the uri pattern that this matcher supports.
The serializer to instantiate an instance of T
an optional list of filters to filter a DeepLinkRequest when matching
Constructors
Functions
Matches a DeepLinkRequest to a DeepLinkMatcher.