query_string 1.0.4

QueryString

This is a query string parser. It turns those nasty query strings into Dart Maps.

Examples

import 'package:query_string/query_string.dart';

void main() {
  var q = '?page=main&action=front&sid=h985jg9034gj498g859gh495&enc=+Hello%20&empty';

  var r = QueryString.parse(q);

  print(r['page']); // "main"
  print(r['asdasd']); // null
}

Installation

Until pub is open to public submissions, you have to specify the path to this Git repository in your pubspec.yaml:

dependencies:
  query_string:
    git: https://github.com/kaisellgren/QueryString.git

License

This library is licensed under MIT.

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  query_string: ">=1.0.4 <2.0.0"

If your package is an application package you should use any as the version constraint.

2. Install it

If you're using the Dart Editor, choose:

Menu > Tools > Pub Install

Or if you want to install from the command line, run:

$ pub install

3. Import it

Now in your Dart code, you can use:

import 'package:query_string/query_string.dart';

About

Query string parser. Turns those nasty query strings into Dart Maps.

Author

Email kaisellgren@gmail.com Kai Sellgren

Homepage

github.com/kaisellgren/QueryString

Documentation

www.dartdocs.org/documentation/query_str...

Uploader

kaisellgren

Share