This commit is contained in:
Hamza-Ayed
2024-06-30 13:27:23 +03:00
parent 08d31bc4d1
commit 176f5105b1
25 changed files with 465 additions and 154 deletions

View File

@@ -7,6 +7,14 @@ void showInBrowser(String url) async {
} else {}
}
Future<void> makePhoneCall(String phoneNumber) async {
final Uri launchUri = Uri(
scheme: 'tel',
path: phoneNumber,
);
await launchUrl(launchUri);
}
void launchCommunication(
String method, String contactInfo, String message) async {
String url;
@@ -35,6 +43,7 @@ void launchCommunication(
case 'phone':
url = 'tel:$contactInfo';
break;
case 'sms':
url = 'sms:$contactInfo?body=${Uri.encodeComponent(message)}';
break;