A delivery address, event location, or store page can offer navigation through a user's preferred app. The example validates destination coordinates, builds an ordered provider list, and offers either Automatic or a manual provider choice.
Reusable Flutter example
This shortened recipe intentionally selects three providers. It demonstrates the same utility used by the larger example screen.
import 'package:deeplink_x/deeplink_x.dart';
Future<bool> navigateToDestination() {
const destination = Coordinate(latitude: 37.5665, longitude: 126.9780);
return DeeplinkX().launchMapDirectionsWithCoordsAction(
actions: [
GoogleMaps.directionsWithCoords(destination: destination),
Waze.directionsWithCoords(destination: destination),
AppleMaps.directionsWithCoords(destination: destination),
],
);
}
The list order expresses the application's preferred order. For manual selection, call DeeplinkX().launchAction(selectedAction) instead. To prohibit all fallback attempts, pass disableFallback: true to the map utility.
Current example inputs and configured providers
Defaults are Seoul coordinates: latitude 37.5665, longitude 126.9780. The example trims and parses both inputs, rejects a parse failure, and checks latitude -90…90 and longitude -180…180 before creating Coordinate. Also reject non-finite values such as NaN and infinity in your application.
At the default destination, the selector offers these 25 entries in order:
- Google Maps
- Amap
- Baidu Maps
- NAVER Map, only when the coordinates are in its configured range
- Apple Maps
- 2GIS
- Waze
- Sygic
- Sygic Truck
- CoPilot
- TomTom GO Fleet
- TomTom GO Expert — experimental
- Moovit
- Air Navigation Pro
- Mappls
- Mapy.com
- TMAP
- KakaoMap
- HERE WeGo
- Citymapper
- OsmAnd
- Neshan
- Yandex Maps
- Yandex Navigator
- Tencent Maps
Selection and fallback behavior
Automatic first attempts every native action in order with fallback disabled. If none succeeds and fallback is enabled, it loops over the configured actions again using their normal fallback behavior and stops on the first successful handoff. This can include action-specific store or web behavior; it is not limited to the first provider's web URL.
Manual choices call ordinary launchAction. The shared selector shows installation/support information separately and keeps manual options available so their documented fallbacks can be tried.
The result is a final Boolean. It does not identify the provider or launch stage that ultimately succeeded, nor prove that turn-by-turn navigation started.
Provider-specific setup and limits
- NAVER is included only for latitude
31.43…44.35and longitude122.37…132.00. The sample usesNaverMapLaunchParams(androidAppName: 'io.github.deeplinkx.demo', iosAppName: 'com.example.deeplinkXExample'); replace both identifiers. Other destinations have 24 configured choices. See the NAVER guide. - Tencent uses placeholder
YOUR_TENCENT_MAPS_KEYasreferer. Replace it with an appropriate authorized value before real use. See the Tencent guide. - Keep TomTom GO Expert marked experimental.
- Provider regions, coordinate systems, routing modes, origin requirements, and credentials differ. Consult each corresponding app document before treating one coordinate or mode as interchangeable across providers.
- Copy the needed configuration patterns from the Android manifest and iOS Info.plist; configure only providers included by the integrating app.
UI behavior
- Reject empty, unparsable, and out-of-range coordinates without launching.
- Default Seoul inputs produce 25 configured entries; Tehran inputs
35.6892,51.3890omit NAVER and produce 24. - Preserve provider order and the required NAVER/Tencent parameters.
- A successful native action prevents subsequent provider and fallback attempts.
- With no native success, normal fallback attempts run in order unless disabled.
- Manual choice uses the selected action; UI status must not be mistaken for a successful route.