Question: I am building an app that has to be able to take an order and send it to a specific WhatsApp number. What exactly am I supposed to do? I can open WhatsApp but I can't figure out how to send a message when opening it.

```
 title: new Text("WhatsApp"),
            trailing: new Icon(Icons.message),
             onTap: () async {
              int phone = 962770593839;
              var whatsappUrl = "whatsapp://send?phone=$phone";
              await UrlLauncher.canLaunch(whatsappUrl) != null
                  ? UrlLauncher.launch(whatsappUrl)
                  : print(
                      "open WhatsApp app link or do a snackbar with 
notification that there is no WhatsApp installed");
            },

```

I expect that when I input a TextField and press send that saved String will be able to be sent to the WhatsApp number after launching WhatsApp.

Answer: 
Try flutter\_open\_whatsapp plugin.You Directly Send Message to Number

```
FlutterOpenWhatsapp.sendSingleMessage("918179015345", "Hello");

```

Link
[Open in WhatsApp](https://pub.dev/packages/flutter_open_whatsapp)
Use [whatsapp\_share](https://pub.dev/packages/whatsapp_share) package

This launches whatsApp with respective number and prefills the text field.

* for text and link

```
 Future<void> share() async {
    await WhatsappShare.share(
      text: 'Whatsapp share text',
      linkUrl: 'https://flutter.dev/',
      phone: '911234567890',
    );
  }

```

* Share images, files

\_image.path is the file path which you wanna share to whatsapp

```
 Future<void> shareFile() async {
    await WhatsappShare.shareFile(
      text: 'Whatsapp share text',
      phone: '911234567890',
      filePath: "${_image.path}",
    );
  }

```

Complete example [here](https://pub.dev/packages/whatsapp_share/example)