You can follow this tutorial How Flutter Open WhatsApp And Send Text Message for complete code. Once use will click on button, we will call a function name as “openwhatsapp()“. Click on Settings and tap Linked Devices. Next, go to your Android or iPhone and open the WhatsApp app. To make text as clickable widget, wrap Text widget with a GestureDetection Widget. Go to or download the desktop app from /download/ Youll then need to open WhatsApp on your phone > Settings > WhatsApp Web/Desktop > Scan the QR. Alternatively, you can open the WhatsApp Web app too. If you have confusion about stateless and stateful widget, so Please read my article. I am going to Create a simple text button in Stateful widget and on Button Click whatsapp app will be open. Otherwise you will get an error “whatsapp is not installed”. WhatsApp Must installed on your mobile phone. So I will suggest you to run this code on Real Mobile phone not on emulator. This Flutter Code is working on Both Android & iPhone. Just get the working WhatsApp number from server api call and use it on flutter code given below as dynamic variable. You can dynamically change the WhatsApp number as well. If You want to launch Whatsapp application from Flutter code with predefine text message then you should follow this tutorial How Flutter Open WhatsApp And Send Text Message. You can do it without using Flutter Share Plugin. In Flutter Open Whatsapp and send text message is very easy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |