MapApp class abstract

A map application that can show markers and directions.

Each concrete subclass represents a specific map app (Google Maps, Waze, etc.) and knows how to generate URLs for markers and directions on that app.

Tree shaking: referencing a static const (e.g. MapApp.google) compiles in only that map's code, strings, and icon, nothing else. Use all to opt in to every map (at the cost of larger binaries).

Consumers can also subclass MapApp to add support for regional or proprietary map apps not included in the plugin.

Implementers

Constructors

MapApp()
Creates a MapApp.
const

Properties

appStoreId String?
Apple App Store numeric identifier (iOS).
no setter
appStoreUrl String?
Apple App Store URL, or null if not available on iOS.
no setter
hashCode int
The hash code for this object.
no setterinherited
Whether this map supports universal links (HTTPS URLs) that work across all platforms, including desktop and web.
no setter
iconBytes Uint8List
App icon as PNG bytes (256×256).
no setter
id String
Stable identifier for this map (e.g. 'google', 'neshan').
no setter
iosScheme String?
iOS URL scheme for canOpenURL detection (e.g. 'comgooglemaps://').
no setter
name String
Human-readable display name (e.g. 'Google Maps').
no setter
playStoreId String?
Google Play Store package identifier (Android).
no setter
playStoreUrl String?
Google Play Store URL, or null if not available on Android.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsDirectionsCoords bool
Whether this map supports directions via coordinates.
no setter
supportsDirectionsSearch bool
Whether this map supports directions via text search query.
no setter
supportsMarkerCoords bool
Whether this map supports markers via coordinates.
no setter
supportsMarkerSearch bool
Whether this map supports markers via text search query.
no setter
supportsWaypoints bool
Whether this map supports waypoints in directions.
no setter

Methods

bestDirectionsUrl({required Location destination, LocationCoords? origin, List<LocationCoords>? waypoints, TravelMode? travelMode, MapPlatform? platform}) String?
Returns the best URL for directions.
bestMarkerUrl(Location location, {int? zoom, MapPlatform? platform}) String?
Returns the best URL for a marker.
directionsSchemeSearchUrl(String query, {LocationCoords? origin, TravelMode? travelMode, required MapPlatform platform}) String?
Builds a URL scheme link for directions via text search (mobile-only).
directionsSchemeUrl({required LocationCoords destination, LocationCoords? origin, List<LocationCoords>? waypoints, TravelMode? travelMode, required MapPlatform platform}) String?
Builds a URL scheme link for showing directions (mobile-only).
directionsSearchUrl(String query, {LocationCoords? origin, TravelMode? travelMode}) String?
Builds a universal link (HTTPS) for showing directions via text search.
directionsUrl({required LocationCoords destination, LocationCoords? origin, List<LocationCoords>? waypoints, TravelMode? travelMode}) String?
Builds a universal link (HTTPS) for showing directions.
isAlwaysAvailable(MapPlatform platform) bool
Whether this map is always available on platform without detection.
markerSchemeSearchUrl(String query, {required MapPlatform platform}) String?
Builds a URL scheme link for showing a marker via text search (mobile-only).
markerSchemeUrl(LocationCoords coords, {int? zoom, required MapPlatform platform}) String?
Builds a URL scheme link for showing a marker (mobile-only).
markerSearchUrl(String query) String?
Builds a universal link (HTTPS) for showing a marker via text search.
markerUrl(LocationCoords coords, {int? zoom}) String?
Builds a universal link (HTTPS) for showing a marker.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
supportsTravelMode(TravelMode mode) bool
Whether this map supports the given mode for directions.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

airnavPro → const AirNavPro
Air Navigation Pro.
all → const List<MapApp>
Every supported map.
amap → const Amap
Amap / Gaode Maps.
apple → const AppleMaps
Apple Maps.
baidu → const BaiduMaps
Baidu Maps.
citymapper → const Citymapper
Citymapper.
copilot → const CoPilot
CoPilot.
doubleGis → const DoubleGis
2GIS.
flitsmeister → const Flitsmeister
Flitsmeister (Android only).
google → const GoogleMaps
Google Maps.
googleGo → const GoogleMapsGo
Google Maps Go (Android only).
here → const HereWeGo
HERE WeGo.
kakao → const KakaoMap
KakaoMap.
magicEarth → const MagicEarth
Magic Earth.
mappls → const Mappls
Mappls (MapmyIndia).
mapswithme → const MapsMe
Maps.me.
mapyCz → const MapyCz
Mapy.cz.
moovit → const Moovit
Moovit.
Naver Map.
neshan → const Neshan
Neshan.
osmand → const OsmAnd
OsmAnd.
osmandplus → const OsmAndPlus
OsmAnd+ (Android only).
petal → const PetalMaps
Petal Maps (Android only).
sygicTruck → const SygicTruck
Sygic Truck.
tencent → const TencentMaps
Tencent / QQ Maps.
tmap → const TMap
TMAP.
tomtomgo → const TomTomGo
TomTom Go.
tomtomgofleet → const TomTomGoFleet
TomTom Go Fleet.
waze → const Waze
Waze.
yandexMaps → const YandexMaps
Yandex Maps.
yandexNavi → const YandexNavi
Yandex Navigator.