Closed mstolk closed 3 years ago
Can you show me your sharing code?
Hi thanks for responding, i'm calling the line ShareFilesAndScreenshotWidgets().shareScreenshot( .... on pressing a RaisedButton. The button is on a bottomNavigationBar from a Scaffold. The previewContainer is within a RepaintBoundary and a Center tag.
If i have some time i will create a testproject with only this code. Strange thing is that from the same button the sharing with an email does work but only the whatsapp option doesnt attach the screenshot.
Can you confirm that you're using the right mimetype?
My mimetype is on "image/png" .... is that correct?
If it is working for other share options then it should be some other problem not related to the pub......... I have tested it the same way as you've done it and it worked for me.
I have the same problem. Only in iOS
I've found this workaround from: https://stackoverflow.com/questions/55685641/share-image-and-text-together-on-whatsapp-in-swift.
onPressed: () { ShareFilesAndScreenshotWidgets().shareScreenshot( _previewContainer, 800, "TITLE", "FILENAME", "MIME", text: Platform.isIOS ? "" : "TEXT"); })
Please note that request for save image cause brutal crash on iOS: you need to insert int info.plist:
<key>NSPhotoLibraryAddUsageDescription</key>
<string>$(FLUTTER_BUILD_NAME)</string>
You need to insert int info.plist:
<key>NSPhotoLibraryAddUsageDescription</key>
<string>$(FLUTTER_BUILD_NAME)</string>
I've found this workaround from: https://stackoverflow.com/questions/55685641/share-image-and-text-together-on-whatsapp-in-swift.
onPressed: () { ShareFilesAndScreenshotWidgets().shareScreenshot( _previewContainer, 800, "TITLE", "FILENAME", "MIME", text: Platform.isIOS ? "" : "TEXT"); })
Please note that request for save image cause brutal crash on iOS: you need to insert int info.plist:
<key>NSPhotoLibraryAddUsageDescription</key> <string>$(FLUTTER_BUILD_NAME)</string>
But I need to share With Text also in iOS. How can I do?
It is written in the documentation
Hi,
When choosing the option to share to a whatsapp contact the screenshot is not shared, only the caption. Any other option (like facebook or email) do share the screenshot. What can be the issue here?
Marco