isInstalled method

Future<bool> isInstalled(
  1. String str
)

Android str 对应包名 Android str corresponds to the package name ios str 对应 url schemes ios str corresponds to the url schemes

Implementation

Future<bool> isInstalled(String str) async {
  if (isIOS || isMacOS) {
    return await canLaunchUrl(Uri.parse(str));
  } else if (isAndroid) {
    return isInstallApp(str);
  }
  return false;
}