flutter_driving_directions 3.0.2 copy "flutter_driving_directions: ^3.0.2" to clipboard
flutter_driving_directions: ^3.0.2 copied to clipboard

A Flutter plugin to launch native driving directions on Android and iOS platforms.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_driving_directions/flutter_driving_directions.dart';

void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter Driving Directions'),
        ),
        body: Center(
          child: FilledButton(
              onPressed: () => _launchNavigation(),
              child: const Text('Launch navigation'),
          ),
        ),
      ),
    );
  }

  Future<void> _launchNavigation() async {
    await FlutterDrivingDirections.launchDirections(
      latitude: 40.689247,
      longitude: -74.044502,
      label: 'Statue of Liberty',
    );
  }
}
1
likes
160
points
274
downloads

Documentation

API reference

Publisher

verified publisherjosephblough.com

Weekly Downloads

A Flutter plugin to launch native driving directions on Android and iOS platforms.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_driving_directions

Packages that implement flutter_driving_directions