Closed ederluca closed 3 years ago
Good afternoon
I am trying to implement the sharing via whatsapp where I am sending image and text, however when the routine calls whatsapp only the text appears and sending only the text below follows what I am doing.
`File file = File(savePath); var raf = file.openSync(mode: FileMode.write); raf.writeFromSync(response.data); await raf.close();
if (file != null) { String base64; if ((tiposhared == 'W') || (tiposhared == 'WB')) { base64 = base64Encode(file.readAsBytesSync()); if (tiposhared == 'W') { FlutterShareMe().shareToWhatsApp(msg: com.eComDesc, base64Image: base64); } else { FlutterShareMe().shareToWhatsApp4Biz(msg: com.eComDesc, base64Image: base64); } } }`
you have to append "data:image/jpeg;base64," in front of base64.
String base64Img = await toBase64Image(myImage); base64Img = "data:image/jpeg;base64," + base64Img;
Good afternoon
I am trying to implement the sharing via whatsapp where I am sending image and text, however when the routine calls whatsapp only the text appears and sending only the text below follows what I am doing.
`File file = File(savePath); var raf = file.openSync(mode: FileMode.write);
raf.writeFromSync(response.data); await raf.close();