Entry point for launching map applications across all Flutter platforms.
Provides a builder-style API: create a request with marker or directions, then call MarkerRequest.show to open or MarkerRequest.getSupportedMaps to discover available maps.
import 'package:map_launcher/map_launcher.dart';
// Show a marker (uses Apple Maps on iOS, Google Maps elsewhere)
await MapLauncher.marker(.coords(59.33, 18.07, title: 'Gamla Stan')).show();
// Show directions
await MapLauncher.directions(
.coords(59.33, 18.07, title: 'Gamla Stan'),
from: .coords(59.33, 18.10),
mode: TravelMode.walking,
).show();
// Specific app with extras
await MapLauncher.marker(.coords(59.33, 18.07)).show(
map: .google,
extra: GoogleExtra(queryPlaceId: 'ChIJLU7j...'),
);
// Discover available maps
final maps = await MapLauncher.marker(.coords(59.33, 18.07))
.getSupportedMaps([.apple, .google, .waze]);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
directions(
Location destination, {Location? from, TravelMode? mode, List< LocationCoords> ? waypoints, Map<String, String> ? extra}) → DirectionsRequest -
Creates a directions request to
destination. -
getAvailableMaps(
List< MapApp> maps) → Future<List< SupportedMap> > -
Returns all maps from
mapsavailable on this platform. -
marker(
Location location, {int? zoom, Map< String, String> ? extra}) → MarkerRequest -
Creates a marker request for
location.