I am building an flutter web application that has to be able to send message on specific WhatsApp Business number and WhatsApp number. What exactly am I supposed to do? If the user's device has either WhatsApp or WhatsApp Business, he opens it. But my problem is that if user's device has both WhatsApp and WhatsApp business, I want one to open on one condition.
var whatsappURlAndroid = "https://wa.me/$whatsappNumber/?text=Hi";
var whatappURLIos ="https://wa.me/$whatsappNumber?text=${Uri.parse("hello")}";
var webWhatsapp= "https://web.whatsapp.com/send?phone=$whatsappNumber&text=Hello";
if (defaultTargetPlatform == TargetPlatform.iOS) {
await launch(whatappURLIos, forceSafariVC: false);
}else if(defaultTargetPlatform == TargetPlatform.android){
await launch(whatsappURlAndroid);
}
else{
await launch(webWhatsapp);
}