Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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");
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement