uri_typed_template 0.7.1 copy "uri_typed_template: ^0.7.1" to clipboard
uri_typed_template: ^0.7.1 copied to clipboard

Build and parse URIs with simple declarations based on Dart extensions.

Build and parse URIs with simple declarations based on Dart extensions.

Install #

# pubspec.yaml
dependencies:
  uri_template:

Quickstart #

final template =
    'album' / 'id'(int) / 'photos' & 'theme'<String>('dark');

final uri = template.build(
  {
    'id': 7,
    'theme': 'light',
  },
); // "album/7/photos?theme=light"

final match = template.match('album/7/photos?theme=light');
if(match.isSuccess) {
  int id = match['id']; // 7
  String theme = match['theme']; // "light"
}

Roadmap #

  • Template equality & comparer
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Build and parse URIs with simple declarations based on Dart extensions.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on uri_typed_template