Only one comment.

  1. marc_s

    You can use flutter_share_me plugin from Dart and implement some plugin setting from Android manifest and need to update Kotlin to the latest version then it's working fine to open Whatsapp Business APP.

    Here are some code snippets to help you:

    Use Share.whatsapp_business Switch Case

    Future<void> onButtonTap(Share share, CustomerDetails customerDetails) async { String msg = "Thank you for contacting us! We will be in touch shortly"; //"Customer Name : "+customerDetails.customerName.toString()+"\n"+"Address : "+customerDetails.address+"\n"+"Mobile No. : " + customerDetails.contactNo1.toString(); String url = 'https://pub.dev/packages/flutter_share_me'; String response; final FlutterShareMe flutterShareMe = FlutterShareMe(); switch (share) { case Share.facebook: response = await flutterShareMe.shareToFacebook(url: url, msg: msg); break; case Share.twitter: response = await flutterShareMe.shareToTwitter(url: url, msg: msg); break; case Share.whatsapp_business: response = await flutterShareMe.shareToWhatsApp4Biz(msg: msg); break; case Share.share_system: response = await flutterShareMe.shareToSystem(msg: msg); break; case Share.whatsapp_personal: response = await flutterShareMe.shareWhatsAppPersonalMessage( message: msg, phoneNumber: '+91'+customerDetails.contactNo1); break; case Share.share_telegram: response = await flutterShareMe.shareToTelegram(msg: msg); break; } debugPrint(response); }

Add a new comment.