Created
February 13, 2023 16:29
-
-
Save hotdang-ca/57eb2cf378908c155fbea196354b956a to your computer and use it in GitHub Desktop.
Query Params and the Uri Class
This file contains 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
void main() { | |
final String url = "http://www.clickspce.com?foo=bar&fizz=buzz&name=Sebastian"; | |
final Uri parsedUri = Uri.parse(url); | |
print(parsedUri.queryParameters['foo']); | |
print(parsedUri.queryParameters['fizz']); | |
print(parsedUri.queryParameters['name']); | |
print(parsedUri.queryParameters['probably_null']); | |
print(parsedUri.query); | |
print(parsedUri.queryParametersAll); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment