How to launch WhatsApp in Flutter web or launch WhatsApp from browser in Flutter or suggest any package from pub.dev?
Asked
Active
Viewed 2,180 times
2 Answers
3
You can give an anchor with href to https://api.whatsapp.com/send/?phone=(phone_number)
For full code
<a href="https://api.whatsapp.com/send/?phone=6281144441111&text=Hello">Send Hi to me</a>
Note:
Make sure you give your country code without (+).
for example 6281144441111

Shaf
- 174
- 1
- 1
- 11
0
You need the url_launcher https://pub.dev/packages/url_launcher. Import the package in you're yaml and then in your .dart
Then use the launch function with the WhatsApp URL: launch('whatsapp://send?phone=$phonenumber')
For the launching the WhatsApp Website use launch('https://web.whatsapp.com')

justin0060
- 73
- 7