Skip to content

Instantly share code, notes, and snippets.

@hotdang-ca
Created February 13, 2023 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotdang-ca/57eb2cf378908c155fbea196354b956a to your computer and use it in GitHub Desktop.
Save hotdang-ca/57eb2cf378908c155fbea196354b956a to your computer and use it in GitHub Desktop.
Query Params and the Uri Class
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