Sorry to ask this here but couldnt find any information related to this online. In native java I have used intent to select com.whatsapp.w4b
and com.whatsapp
.
I cant figure out how to do it with dart. So far I know:
String androidUrl = 'https://wa.me/$recipientMobile/?text=${Uri.parse(message)}';
String iosUrl = 'https://api.whatsapp.com/send?phone=$recipientMobile=${Uri.parse(message)}';
if (Platform.isAndroid) {
await launch(androidUrl);
} else if (Platform.isIOS) {
if(await canLaunch(iosUrl)){
await launch(iosUrl);
} else {
showToast('Error! Try again.', 'Short');
}
}
This code works but only launches default WhatsApp. How to launch bussiness / personal whatsapp?
Thanks in advance.