'Flutter Web send pdf file to a WhatsApp contact using URL Launcher
I have implemented a void function to launch WhatsApp in Flutter Web using URL Launcher. However my goal is to pass a pdf file to a WhatsApp contact and not the text HelloWorld. Does anyone know how I go about it and should I convert the pdf file to Uri and then parse as a string?
void _openWhatsApp(String phoneNumberControllerText) async {
String phoneNumber = phoneNumberControllerText;
var url = 'https://wa.me/${phoneNumber}?text=HelloWorld';
await launch(url);
}
Solution 1:[1]
What you want is to share the PDF, check out this package share_plus
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | S. Souza |