# Map Launcher Plus
A powerful Flutter plugin to detect and launch map applications on iOS and Android.
It provides a native-style bottom sheet when multiple apps are installed and supports saving a default map app for future launches.
---
## Features
- πΊοΈ **Detect Installed Maps** β Automatically finds all supported map apps.
- π± **Cross-Platform** β Works on both Android and iOS.
- π **Two Modes**
- **Navigate** β Draws a route to a coordinate
- **Show Location** β Display a coordinate with a pin
- π **Native Bottom Sheet UI** β Lets the user choose between installed map apps.
- πΎ **Default App Preference** β User can choose βAlways use this appβ.
- π **Direct Launch** β If one app or a default exists, it launches instantly.
- βοΈ **Simple API** β High-level helper + low-level control available.
---
## Supported Map Apps
| Platform | Apps |
|---------|------|
| **Android** | Google Maps, Waze,Here we go,Sygic,Yandex Navigator,Yandex Maps and Navigator |
| **iOS** | Apple Maps, Google Maps, Waze,Here we go,Sygic,Yandex Navigator,Yandex Maps and Navigator |
---
## Installation
Add to your `pubspec.yaml`:
```yaml
dependencies:
maplauncherplus: ^1.0.0 # Use latest version
Run:
flutter pub get
Platform Setup
iOS (Required)
Add URL schemes in ios/Runner/Info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
<string>waze</string>
<string>here-route</string>
<string>com.sygic.aura</string>
<string>yandexnavi</string>
<string>yandexmaps</string>
</array>
Apple Maps does not require configuration.
Android (No setup required)
The plugin already includes required <queries> entries in the manifest.
Usage
Import the package:
import 'package:maplauncherplus/maplauncherplus.dart';
final mapLauncher = MapLauncherPlus();
High-Level Usage (Recommended)
void _showLocation() {
mapLauncher.openMap(
context: context,
latitude: 34.052235,
longitude: -118.243683,
mode: MapLauncherMode.show,
);
}
void _navigate() {
mapLauncher.openMap(
context: context,
latitude: 34.052235,
longitude: -118.243683,
);
}
This method automatically:
- Detects installed apps
- Remembers default app
- Shows chooser bottom sheet if needed
Low-Level Usage
Get installed map apps
final apps = await mapLauncher.getInstalledMapApps();
Clear Saved Default App
await mapLauncher.resetDefaultMapApp();
License
MIT License