Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

flutter web WhatsApp web won't open

I have a button when the button is clicked it should open WhatsApp on whatsAppW Web with the given phone number, and I’m using url_luancher

here i want to navigate to whatsApp Url but when i click on the button it won’t work.

 _launch(url) async {
    if (await canLaunchUrl(url)) {
      await launchUrl(url);
    } else {
      print("Not supported");
    }
  }

OutlinedButton(
  onPressed: () => 
   _launch(Uri.parse(
  'whatsapp://send?text=sample text&phone=00000000000'));
                

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

To open via whatsapp web you can use whatsapp api call and use url_launcher to open it in browser

https://api.whatsapp.com/send?phone=+00000000000000&text=iwanttotestit
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading