Open ShamsFaraj opened 3 years ago
i also have same problem
In my case, the optional text was shown just fine on Android, but not in IOS. I used another plugin, result was also the same. So, I didn't used text for ios platform after all, like below:
if(Platform.isAndroid) {
await Share.file('REBUSTA', 'esys.png', pngBytes, 'image/png', text: 'REBUSTA mobil oyununu pulsuz əldə et və Rebus Ustası adını qazan. \nwww.rebusta.az\n\n Kibrit.tech');
} else {
await Share.file('REBUSTA', 'esys.png', pngBytes, 'image/png');
}
I am using this code but not working on android. Only image sharing not with text. anyone can help me?
Future
https://pub.dev/packages/vocsy_esys_flutter_share
Use this Package its working on latest version
Text is not shown when sharing image on facebook or instagram. But it's shown on messengers. How can I show text as text on facebook feed etc?
this is my method sample:
Future _shareImage(RenderRepaintBoundary imageObj) async {
try {
final image = await imageObj.toImage(pixelRatio: 5.0);
final ByteData byteData =
await image.toByteData(format: ImageByteFormat.png);
final pngBytes = byteData.buffer.asUint8List();
await Share.file('REBUSTA', 'esys.png', pngBytes, 'image/png',
text: 'www.rebusta.com');
} catch (e) {
print('error: $e');
}
}