map_launcher 3.3.0 copy "map_launcher: ^3.3.0" to clipboard
map_launcher: ^3.3.0 copied to clipboard

Map Launcher is a flutter plugin to find available maps installed on a device and launch them with a marker or show directions.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:map_launcher_example/show_directions.dart';
import 'package:map_launcher_example/show_marker.dart';

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

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

  @override
  State<MapLauncherDemo> createState() => _MapLauncherDemoState();
}

enum LaunchMode { marker, directions }

class _MapLauncherDemoState extends State<MapLauncherDemo> {
  int selectedTabIndex = 0;

  List<Widget> widgets = [const ShowMarker(), const ShowDirections()];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Map Launcher Demo'),
        ),
        body: widgets[selectedTabIndex],
        bottomNavigationBar: BottomNavigationBar(
          currentIndex: selectedTabIndex,
          onTap: (newTabIndex) => setState(() {
            selectedTabIndex = newTabIndex;
          }),
          items: const [
            BottomNavigationBarItem(
              icon: Icon(Icons.pin_drop),
              label: 'Marker',
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.directions),
              label: 'Directions',
            ),
          ],
        ),
      ),
    );
  }
}
762
likes
140
pub points
99%
popularity
screenshot

Publisher

verified publisherfluttered.dev

Map Launcher is a flutter plugin to find available maps installed on a device and launch them with a marker or show directions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on map_launcher