Skip to content
pubscout

uri

1.0.0, released 6 years ago by google.dev

Utilities for building and parsing URIs, including RFC 6570 template support

WASM-ready
$ flutter pub add uri
Source repository

What it does

Provides classes to match, parse, and generate URIs. UriTemplate expands templates with data, UriParser extracts parameters, and UriBuilder helps construct URIs incrementally.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to generate URIs from templates
  • You need to parse URIs into parameters
  • You need a mutable URI builder

Skip it when

  • You need a high-level HTTP client
  • You need advanced routing in Flutter

Strengths

  • Supports RFC 6570 URI templates
  • Offers parsing of URI templates with restrictions
  • Provides a mutable UriBuilder
  • Null safety and modern Dart support

Weaknesses

  • Limited to URI manipulation only
  • Parsing support is restricted to a subset of templates
  • No network or HTTP functionality

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
var template = UriTemplate("http://example.com/~{user}/");
String fredUri = template.expand({'user': 'fred'});

Alternatives

Packages that do the same job and could replace uri.

  • gtk

    GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.

  • flutter_flavorizr

    A utility to easily create and configure application flavors in Flutter.

  • black_hole_flutter

    Flutter utility functions, extension methods, and custom widgets.

  • rrule

    Recurrence rule parsing, calculation, and formatting as defined in the iCalendar RFC.

Works with

Packages commonly used together with uri: ones it builds on, ones built on it, and its own family.