Skip to content
pubscout

routing_client_dart

1.0.8, released a year ago by an unverified publisher

Dart client package for routing APIs like OSRM and Valhalla.

WASM-ready
$ flutter pub add routing_client_dart
Source repository

What it does

Provides API clients and managers for routing, trip services, and navigation instructions using OSRM and Valhalla backends. It handles waypoints, geometries, polylines, and checks if a location is on a path.

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

Use it when

  • You need to fetch routes or travel paths from an OSRM or Valhalla backend in Dart.
  • You want to calculate trip optimizations or extract navigation instructions and check if a location is on a path.

Skip it when

  • You are looking for a fully-featured interactive map widget (this package is for routing data only).
  • You use routing backends other than OSRM or Valhalla (unless supported via coming soon updates).

Strengths

  • Supports multiple routing backends (OSRM and Valhalla).
  • Includes path checking and next-instruction navigation helpers.

Weaknesses

  • Documentation is sparse and requires checking code/README for details.
  • Certain instruction features may contain inaccurate information as noted by the author.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Add the dependency to pubspec.yaml and instantiate RoutingManager with your request configurations.

List<LngLat> waypoints = [
  LngLat(lng: 13.388860, lat: 52.517037),
  LngLat(lng: 13.397634, lat: 52.529407),
];
final manager = RoutingManager();
final route = await manager.getRoute(
  OSRMRequest.route(
    waypoints: waypoints,
    geometries: Geometries.polyline,
    steps: true,
    languages: Languages.en,
  )
);

Alternatives

Packages that do the same job and could replace routing_client_dart.

Works with

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