isAppInstalled static method
Function to check if app is installed on device returns boolean
Implementation
static isAppInstalled(
{String? iosUrlScheme, String? androidPackageName}) async {
String packageName = Platform.isIOS ? iosUrlScheme! : androidPackageName!;
if (packageName.isEmpty) {
throw Exception('The package name can not be empty');
}
dynamic isAppInstalled = await _channel
.invokeMethod('isAppInstalled', {'package_name': packageName});
return isAppInstalled;
}