supportsMode method

  1. @override
Future<bool> supportsMode(
  1. PreferredLaunchMode mode
)

Returns true if the given launch mode is supported by the current implementation.

Clients are not required to query this, as implementations are strongly encouraged to automatically fall back to other modes if a launch is requested using an unsupported mode (matching historical behavior of the plugin, and thus maximizing compatibility with existing code).

Implementation

@override
Future<bool> supportsMode(PreferredLaunchMode mode) async {
  return mode == PreferredLaunchMode.platformDefault ||
      mode == PreferredLaunchMode.externalApplication;
}