You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd really need this to share files. There's a bunch of unofficial libs around but they don't work very well. Seems like a key piece of functionality that shouldn't be missing.
@zoechi This is not a duplicate. #9817 is (only) about sharing images. I think this is such an essential feature and should be supported by an official flutter plugin.
There is no ambiguity or multiple interpretations of this feature. Android and iOS support it natively therefore flutter should also do that.
Reacted by Modestas Valauskas, Günter Zöchbauer, Jeremiah Ogbomo, Shinji Yamada, Allan Wolski, dspoonia7, Crimsons, Sander Larsen, Chris Harris, Jamie Kerber and 7 more
This plugin is maintained by flutter.
But the one you told was from someone else. The plugin has some bugs in android 10 and some different models. I have samsung it is not working. The plugin was last updated on 2019.
Right that library also have problem when sharing image and text in IOS also it seems not updated anymore. Is there any solution that we can use for share both image and text?
Reacted by FilipeOS, Malav desai and MichaelJAlvarez
Hey @TahaTesser ,
I'm using this share plugin by flutter.
And I'm trying to share an image as well as text,
but only text gets shared while sharing on Whatsapp.
Here is the code.
Future<void> shareApp({@required String referralCode}) async {
final ByteData bytes = await rootBundle.load('assets/images/share.jpg');
final Uint8List list = bytes.buffer.asUint8List();
final tempDir = await getTemporaryDirectory();
final file = await new File('${tempDir.path}/image.jpg').create();
file.writeAsBytesSync(list);
Share.shareFiles(
['${tempDir.path}/image.jpg'],
text:
"Hey! Download the app and use this referral code $referralCode.",
);
}
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-]Share plugin: Share more than text[/-][+]Share plugin: share more than text[/+]pablote commentedon Aug 3, 2018
I'd really need this to share files. There's a bunch of unofficial libs around but they don't work very well. Seems like a key piece of functionality that shouldn't be missing.
zoechi commentedon Dec 6, 2018
Duplicate of #9817
I'm closing this because the other has more discussion.
There is also a community plugin available now.
modulovalue commentedon Dec 6, 2018
@zoechi This is not a duplicate. #9817 is (only) about sharing images. I think this is such an essential feature and should be supported by an official flutter plugin.
There is no ambiguity or multiple interpretations of this feature. Android and iOS support it natively therefore flutter should also do that.
zoechi commentedon Dec 6, 2018
I don't think there is much difference once you are beyond sharing text.
But of course we can keep this more generic issue open as well.
zoechi commentedon Dec 6, 2018
Did you check the plugin mentioned in #9817?
modulovalue commentedon Dec 6, 2018
Yes and unfortunately it's only for text & images. I've added a link to it in the issue description.
pboos commentedon Dec 7, 2018
For those interested, I just created a pull request that adds file sharing to the share plugin for both ios and android.
flutter-team-archive/plugins#970
22 remaining items
steve28100 commentedon Apr 22, 2020
Right that library also have problem when sharing image and text in IOS also it seems not updated anymore. Is there any solution that we can use for share both image and text?
Gulnur1 commentedon May 28, 2020
li8607 commentedon Jul 9, 2020
GManzke commentedon Aug 28, 2020
Was fixed today!! 👏👏👏👏👏🏆🏆🏆🏆
Share pub link
iapicca commentedon Aug 30, 2020
@TahaTesser
TahaTesser commentedon Aug 31, 2020
Thanks @GManzke @iapicca
Closing as fixed. If you disagree, please write in the comments and I will reopen it.
Thank you
ceosss commentedon May 17, 2021
Hey @TahaTesser ,
I'm using this share plugin by flutter.
And I'm trying to share an image as well as text,
but only text gets shared while sharing on Whatsapp.
Here is the code.
TahaTesser commentedon May 18, 2021
@ceosss
Please file a new issue with the details
samuelprogmattic commentedon Jun 3, 2021
i also want to share text as well with image how to that
github-actions commentedon Jul 31, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.