google_directions_api 0.10.0 copy "google_directions_api: ^0.10.0" to clipboard
google_directions_api: ^0.10.0 copied to clipboard

The Directions API is a service that calculates directions between locations. You can search for directions for several modes of transportation.

example/README.md

google_directions_api_example #

Demonstrates how to use the google_directions_api package.

Usage #

import 'package:google_directions_api/google_directions_api.dart';

void main() {
  DirectionsService.init('API_KEY');

  final directinosService = DirectionsService();

  final request = DirectionsRequest(
    origin: 'Chicago, IL',
    destination: 'San Francisco, CA',
    travelMode: TravelMode.driving,
  );

  directinosService.route(request,
      (DirectionsResult response, DirectionsStatus status) {
    if (status == DirectionsStatus.ok) {
      // do something with successful response
    } else {
      // do something with error response
    }
  });
}

Getting Started #

For help getting started with Directions API, view online documentation, which offers tutorials, samples, guidance, and a full API reference.

54
likes
140
points
1.95k
downloads

Publisher

verified publisherthisismarch.dev

Weekly Downloads

The Directions API is a service that calculates directions between locations. You can search for directions for several modes of transportation.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flinq, google_polyline_algorithm, http

More

Packages that depend on google_directions_api