esysberlin / esys-flutter-share

A Flutter plugin for sharing files & text with other applications.
Apache License 2.0
130 stars 147 forks source link

Null Safety Support #86

Open pablo-johnson opened 3 years ago

pablo-johnson commented 3 years ago

Hello, is there any plan for null safety support?

shilangyu commented 3 years ago

Oh man, last update was 2 years ago. What are some good alternatives to this packages? This stops us from going sound null safe

Nader2004 commented 3 years ago

This package is blocking from upgrading another versions of other packages. Are there no other plans.

neckaros commented 3 years ago

I updated my branch that work on iPad to null safety if it can help you I have not done much testing!

  esys_flutter_share:
    git:
      url: git://github.com/neckaros/esys-flutter-share.git
shilangyu commented 3 years ago

I looked around and found share. I recommend switching over to it: https://pub.dev/packages/share, it serves the same purpose, but is actually maintained and is provided by Google itself (has null safety already)

neckaros commented 3 years ago

Thanks i don't think it is as flexible. for ex i use this plugin to share binary data directly and not a file path

hpoul commented 3 years ago

i use this plugin to share binary data directly and not a file path

@neckaros well, that's a bit of a moot point.. as this plugin does nothing else than write those bytes into a temporary file.. just copy this 3 line function into your own project.. (the only required change would be to use the file's extension to specify the mime type, instead of directly the mime type :-( )

https://github.com/esysberlin/esys-flutter-share/blob/1e2b0c2c4db426fd552155fad5a5360cd8462a79/lib/esys_flutter_share.dart#L31-L33

tneumueller commented 3 years ago

Little note:

getTemporaryDirectory() is from the path_provider package, File is from "dart:io".

mobashshirurrahman commented 3 years ago

moot

please add line also that we put in share function

mobashshirurrahman commented 3 years ago

Little note:

getTemporaryDirectory() is from the path_provider package, File is from "dart:io".

please will you post proper code snippet to share an image from URL using google share pckg

hicnar commented 3 years ago

I looked around and found share. I recommend switching over to it: https://pub.dev/packages/share, it serves the same purpose, but is actually maintained and is provided by Google itself (has null safety already)

@shilangyu Good luck sharing with the Google plugin anything of substantial size https://stackoverflow.com/questions/28729955/max-size-of-string-data-that-can-be-passed-in-intents/42158221

alexverbitsky commented 3 years ago

i use this plugin to share binary data directly and not a file path

@neckaros well, that's a bit of a moot point.. as this plugin does nothing else than write those bytes into a temporary file.. just copy this 3 line function into your own project.. (the only required change would be to use the file's extension to specify the mime type, instead of directly the mime type :-( )

https://github.com/esysberlin/esys-flutter-share/blob/1e2b0c2c4db426fd552155fad5a5360cd8462a79/lib/esys_flutter_share.dart#L31-L33

I confirm that it works fine using these 3 lines of code along with share_plus plugin

cihadturhan commented 3 years ago

i use this plugin to share binary data directly and not a file path

@neckaros well, that's a bit of a moot point.. as this plugin does nothing else than write those bytes into a temporary file.. just copy this 3 line function into your own project.. (the only required change would be to use the file's extension to specify the mime type, instead of directly the mime type :-( ) https://github.com/esysberlin/esys-flutter-share/blob/1e2b0c2c4db426fd552155fad5a5360cd8462a79/lib/esys_flutter_share.dart#L31-L33

I confirm that it works fine using these 3 lines of code along with share_plus plugin

When you share with share_plus, it doesn't accept to mimeType so I didn't like it. Eg. if you share an image, you expect some options like whatsapp, instagram and "save to gallery". share_plus doesn't do that.

image

kaushikgodhani commented 2 years ago

https://pub.dev/packages/vocsy_esys_flutter_share

Use this Package its working on latest version