This commit is contained in:
Hamza-Ayed
2024-05-31 01:25:20 +03:00
parent 93adf15874
commit efec9eb6a2
8 changed files with 509 additions and 503 deletions

View File

@@ -22,7 +22,7 @@ void launchCommunication(
url = 'tel:$contactInfo';
break;
case 'sms':
url = 'sms:$contactInfo?body=$encodedMessage';
url = 'sms:$contactInfo&body=$encodedMessage';
break;
case 'whatsapp':
url =
@@ -58,8 +58,10 @@ void launchCommunication(
return;
}
if (await canLaunch(url)) {
await launch(url);
print('Launching URL: $url'); // Add this line for debugging
if (await canLaunchUrl(Uri.parse(url))) {
await launchUrl(Uri.parse(url));
} else {
print('Could not launch $url');
}