graphhooper_route_navigation 0.0.8 copy "graphhooper_route_navigation: ^0.0.8" to clipboard
graphhooper_route_navigation: ^0.0.8 copied to clipboard

A new plugin for GraphHooper route navigation. Use Mapbox Map as a base layer & map styles and Graphhooper Map route navigation data for polyline, duration and time.

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'bindings/http_overrides.dart';
import 'map_dashboard_screen.dart';

Future<void> main() async {
  // loads the env file if doesnt exist then throws error
  await dotenv.load(fileName: ".env");

  // ensures the initialization
  WidgetsFlutterBinding.ensureInitialized();
  HttpOverrides.global = MyHttpOverrides();
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
  ]);
  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Ghaphhooper Map Route Navigation',
      debugShowCheckedModeBanner: false,
      debugShowMaterialGrid: false,
      theme: ThemeData(brightness: Brightness.light),
      darkTheme: ThemeData(brightness: Brightness.dark),
      themeMode: ThemeMode.dark,
      home: const MapDashboardScreen(),
    );
  }
}
12
likes
150
points
154
downloads

Publisher

unverified uploader

Weekly Downloads

A new plugin for GraphHooper route navigation. Use Mapbox Map as a base layer & map styles and Graphhooper Map route navigation data for polyline, duration and time.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

expandable_bottom_sheet, flutter, flutter_plugin_android_lifecycle, flutter_web_plugins, http, maplibre_gl, plugin_platform_interface, text_to_speech, vector_math

More

Packages that depend on graphhooper_route_navigation