i am trying to open messenger and WhatsApp using launchUrl() method from the URL_Launch plugin but every time i try the browser opens and show this message:
The webpage at intent://user/562084722.?intent_trigger=mme#intent;scheme=fb-messenger;package=com.facebook.orca;end could not be loaded because: net::ERR_UNKOWN_URL_SCHEME
this is the code :
//Call Directly
_directCall() {
launchUrl(Uri.parse('tel:00962785522213'));
}
//Open WhatsApp
_launchWhatsapp() {
launchUrl(Uri.parse("https://wa.me/+962797809910"));
}
//Open Messenger
_openMessenger() {
launchUrl(Uri.parse('https://m.me/amr.al.shugran'));
}
//open email
_openGmail() {
final Uri emailLaunchUri =
Uri(scheme: 'mailto', path: 'info@athaddak.com', queryParameters: {
'subject': 'Inquiry',
});
launchUrl(emailLaunchUri);
}
the direct call and gmail are working fine, but whatsApp and messenger shows the error above so am not sure what format i should use to make it works, ill appreciate any help.
note: if i put for example "https://google.com", it opens without any issues. also if i use the old method launch() it also works with messenger and WhatsApp.