isInstalled static method
Checks whether whatsapp is installed in device or not
Package is optional enum parameter which is defualt to Package.whatsapp for business whatsapp set it to Package.businessWhatsapp, it cannot be null
return true if installed otherwise false.
Implementation
static Future<bool?> isInstalled({Package package = Package.whatsapp}) async {
String _package;
_package = package.index == 0 ? "com.whatsapp" : "com.whatsapp.w4b";
final bool? success =
await _channel.invokeMethod('isInstalled', <String, dynamic>{
"package": _package,
});
return success;
}