launchWhatsappURL static method
Implementation
static void launchWhatsappURL(String phone, String message) async {
try {
String url = AppProperties.getWhatsappUrl().replaceAll("<phoneNumber>", phone);
url = url.replaceAll("<message>", message);
if (await canLaunchUrl(Uri.parse("https://$url"))) { //TODO Verify how to use constant
await launchUrl(Uri.parse(url));
} else {
AppConfig.logger.i('Could not launch $url');
}
} catch(e) {
AppConfig.logger.e(e.toString());
}
}