DEEPLINKX / app

Moovit

Moovit actions, setup, native platforms, and fallback options.

DeeplinkX 1.5.8 · Source

Platforms and setup

Native platforms: ios, android.

Public actions

Moovit.open

factory Moovit.open({final bool fallbackToStore = false})

Launch with DeeplinkX.launchApp. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.

ParameterTypeRequiredDefault
fallbackToStoreboolNofalse

Exact source

Moovit.view

static MoovitViewAction view({ required final Coordinate coordinate, final String partnerId = 'deeplink_x', final bool fallbackToStore = false, })

Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.

ParameterTypeRequiredDefault
coordinateCoordinateYes—
partnerIdStringNo'deeplink_x'
fallbackToStoreboolNofalse

Exact source

Moovit.directionsWithCoords

static MoovitDirectionsWithCoordsAction directionsWithCoords({ required final Coordinate destination, final Coordinate? origin, final String? destinationTitle, final String? originTitle, final String partnerId = 'deeplink_x', final bool fallbackToStore = false, })

Launch with DeeplinkX.launchAction. Native platforms: ios, android. Action web fallback: available. Store-fallback flag: supported; opt in explicitly.

ParameterTypeRequiredDefault
destinationCoordinateYes—
originCoordinate?No—
destinationTitleString?No—
originTitleString?No—
partnerIdStringNo'deeplink_x'
fallbackToStoreboolNofalse

Exact source

Provider setup and examples

DeeplinkX supports Moovit's moovit URI scheme so Flutter apps can open nearby transit options or launch coordinate-based directions in the native Moovit app on iOS and Android.

References

Available Actions

Launch Moovit

final deeplinkX = DeeplinkX();
await deeplinkX.launchApp(Moovit.open());

View Map

await deeplinkX.launchAction(
  Moovit.view(
    coordinate: const Coordinate(latitude: 40.7128, longitude: -74.0060),
    partnerId: 'my_flutter_app',
  ),
);

Directions With Coordinates

await deeplinkX.launchAction(
  Moovit.directionsWithCoords(
    origin: const Coordinate(latitude: 40.7580, longitude: -73.9855),
    originTitle: 'Times Square',
    destination: const Coordinate(latitude: 40.7527, longitude: -73.9772),
    destinationTitle: 'Grand Central',
  ),
);

Omit origin to let Moovit start from the user's current location.

Platform Configuration

iOS

Add the Moovit scheme to the LSApplicationQueriesSchemes array in ios/Runner/Info.plist:

<string>moovit</string>

Android

Allow querying the package in android/app/src/main/AndroidManifest.xml:

<queries>
  <package android:name="com.tranzmate" />
</queries>

URI Formats

  • View map: moovit://nearby?lat={latitude}&lon={longitude}&partner_id={partnerId}
  • Directions: moovit://directions?dest_lat={destinationLatitude}&dest_lon={destinationLongitude}&dest_name={destinationTitle}&orig_lat={originLatitude}&orig_lon={originLongitude}&orig_name={originTitle}&partner_id={partnerId}

partnerId is optional and defaults to deeplink_x. DeeplinkX emits Moovit's documented partner_id on nearby and directions actions.

Fallback Behavior

  1. DeeplinkX opens the native app when installed.
  2. If the app is missing and fallbackToStore is true, we redirect to the appropriate store listing.
  3. Otherwise the action falls back to https://www.moovit.com/.
  4. Set disableFallback: true when calling launchAction to skip both store and web fallbacks.

Fallback Support Matrix

ActionStore FallbackWeb Fallback
Open appYesYes
View mapYesYes
Directions with coordinatesYesYes