launchApp static method
Launch an app with the given uri
scheme if it exists.
If the app app isn't found, then a PlatformException is thrown.
Implementation
static Future<void> launchApp(String uri) async {
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent('uri', () => uri);
if (Platform.isAndroid) {
await _channel.invokeMethod("launchApp", args);
} else if (Platform.isIOS) {
bool appAvailable = await _channel.invokeMethod("launchApp", args);
if (!appAvailable) {
throw PlatformException(code: "", message: "App not found $uri");
}
}
}