var phoneNumber = "917390123456";
var urlString = "whatsapp://send?phone=$phoneNumber";
// Convert the String URL to a Uri object
final Uri url = Uri.parse(urlString);
if (await canLaunchUrl(url)) {
await launchUrl(url);
}
How can I use the Launcher_url for IOS
I get the error:
PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))
2
Answers
you can check this dependency, which will help you send messages
https://pub.dev/packages/whatsapp
Add these lines to your
/ios/Runner/Info.plist
file if you want to use external links.You can also use this link :
https://wa.me/$phonenumber