Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Null Safety Support #86

Open
pablo-johnson opened this issue Feb 10, 2021 · 13 comments
Open

Null Safety Support #86

pablo-johnson opened this issue Feb 10, 2021 · 13 comments
Labels
enhancement New feature or request

Comments

@pablo-johnson
Copy link

Hello, is there any plan for null safety support?

@pablo-johnson pablo-johnson added the enhancement New feature or request label Feb 10, 2021
@shilangyu
Copy link

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
Copy link

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

@neckaros
Copy link

neckaros commented Mar 9, 2021

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
Copy link

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
Copy link

neckaros commented Mar 9, 2021

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
Copy link

hpoul commented Mar 10, 2021

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 :-( )

final tempDir = await getTemporaryDirectory();
final file = await new File('${tempDir.path}/$name').create();
await file.writeAsBytes(bytes);

@tneumueller
Copy link

Little note:

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

@mobashshirurrahman
Copy link

mobashshirurrahman commented Apr 11, 2021

moot

please add line also that we put in share function

@mobashshirurrahman
Copy link

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
Copy link

hicnar commented Apr 18, 2021

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
Copy link

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 :-( )

final tempDir = await getTemporaryDirectory();
final file = await new File('${tempDir.path}/$name').create();
await file.writeAsBytes(bytes);

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

@cihadturhan
Copy link

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 :-( )

final tempDir = await getTemporaryDirectory();
final file = await new File('${tempDir.path}/$name').create();
await file.writeAsBytes(bytes);

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
Copy link

https://pub.dev/packages/vocsy_esys_flutter_share

Use this Package its working on latest version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests