LaunchOptions class

Options for configuring the behavior of launch actions, including multi-choice dialogs, platform-specific settings, and callbacks.

Annotations

Constructors

LaunchOptions({bool useMultiChoiceDialog = false, String? dialogTitle, String? dialogMessage, String? androidPreferredAppPackageName, List<String>? iOSAppSchemes, void onLaunchAttempt(LaunchType type, Uri uri)?, void onLaunchResult(LaunchType type, Uri uri, bool success)?, String? appNotInstalledDialogTitle, String? appNotInstalledDialogMessage, String? confirmationDialogTitle, String? confirmationDialogMessage, LaunchFallbackMode fallbackMode = LaunchFallbackMode.prompt, bool requireConfirmation = false, bool checkAppInstallation = false, bool bypassAppDetectionAndFallback = false, String? appStoreLink, void onTrackLaunch(LaunchType type, Uri uri)?})
Creates a LaunchOptions instance.
const

Properties

androidPreferredAppPackageName String?
(Android-specific) The package name of a preferred app to launch.
final
appNotInstalledDialogMessage String?
The message for the "App not installed" dialog.
final
appNotInstalledDialogTitle String?
The title for the "App not installed" dialog.
final
An optional link to the app store for the target application.
final
bypassAppDetectionAndFallback bool
If true, the app detection and fallback logic will be bypassed.
final
checkAppInstallation bool
If true, the system will check if the target app is installed before attempting to launch.
final
confirmationDialogMessage String?
The message for the confirmation dialog.
final
confirmationDialogTitle String?
The title for the confirmation dialog.
final
dialogMessage String?
The message to display in the multi-choice dialog.
final
dialogTitle String?
The title for the multi-choice dialog.
final
fallbackMode LaunchFallbackMode
Defines the strategy for handling web fallbacks when an app-specific URI fails.
final
hashCode int
The hash code for this object.
no setteroverride
iOSAppSchemes List<String>?
(iOS-specific) A list of URL schemes to query for app availability.
final
onLaunchAttempt → void Function(LaunchType type, Uri uri)?
A callback function that is called before a launch attempt is made.
final
onLaunchResult → void Function(LaunchType type, Uri uri, bool success)?
A callback function that is called after a launch attempt is completed.
final
onTrackLaunch → void Function(LaunchType type, Uri uri)?
A callback function that is called when a launch is successfully tracked by analytics.
final
requireConfirmation bool
If true, a confirmation dialog will be shown before launching the URI.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useMultiChoiceDialog bool
Whether to enable a multi-choice dialog when multiple apps can handle the launch.
final

Methods

copyWith({bool? useMultiChoiceDialog, String? dialogTitle, String? dialogMessage, String? androidPreferredAppPackageName, List<String>? iOSAppSchemes, void onLaunchAttempt(LaunchType type, Uri uri)?, void onLaunchResult(LaunchType type, Uri uri, bool success)?, String? appNotInstalledDialogTitle, String? appNotInstalledDialogMessage, String? confirmationDialogTitle, String? confirmationDialogMessage, LaunchFallbackMode? fallbackMode, bool? requireConfirmation, bool? checkAppInstallation, bool? bypassAppDetectionAndFallback, String? appStoreLink, void onTrackLaunch(LaunchType type, Uri uri)?}) LaunchOptions
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.
override