esys-flutter-share icon indicating copy to clipboard operation
esys-flutter-share copied to clipboard

Null Safety Support

Open pablo-johnson opened this issue 3 years ago • 13 comments

Hello, is there any plan for null safety support?

pablo-johnson avatar Feb 10 '21 00:02 pablo-johnson

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

shilangyu avatar Mar 04 '21 20:03 shilangyu

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

Nader2004 avatar Mar 04 '21 21:03 Nader2004

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

neckaros avatar Mar 09 '21 14:03 neckaros

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 avatar Mar 09 '21 15:03 shilangyu

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

neckaros avatar Mar 09 '21 15:03 neckaros

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

hpoul avatar Mar 10 '21 20:03 hpoul

Little note:

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

tneumueller avatar Apr 02 '21 14:04 tneumueller

moot

please add line also that we put in share function

mobashshirurrahman avatar Apr 11 '21 14:04 mobashshirurrahman

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

mobashshirurrahman avatar Apr 11 '21 16:04 mobashshirurrahman

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

hicnar avatar Apr 18 '21 08:04 hicnar

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

alexverbitsky avatar Oct 01 '21 05:10 alexverbitsky

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

cihadturhan avatar Oct 09 '21 13:10 cihadturhan

https://pub.dev/packages/vocsy_esys_flutter_share

Use this Package its working on latest version

kaushikgodhani avatar Jul 01 '22 10:07 kaushikgodhani