esysberlin / esys-flutter-share

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

Share text and images simultaneously #5

Closed d-wolf closed 5 years ago

d-wolf commented 5 years ago

A requested feature is to share images and text simultaneously like proposed in this commit.

ricamgar commented 5 years ago

Hi, any plans on merging this new feature?

juanjoserodrigolazaro commented 5 years ago

any notice?

Purus commented 5 years ago

Interested in this feature.

mhsampaio commented 5 years ago

I was looking for this feature just now. XD

OrionWambert commented 5 years ago

I was writing an issue for that ,please add this feature !

rgarcia11 commented 5 years ago

Eager for this feature!

d-wolf commented 5 years ago

Added in 1.0.2:

final ByteData bytes = await rootBundle.load('assets/image1.png');
await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png', text: 'My optional text.');
final ByteData bytes1 = await rootBundle.load('assets/image1.png');
final ByteData bytes2 = await rootBundle.load('assets/image2.png');
final ByteData bytes3 = await rootBundle.load('assets/addresses.csv');

await Share.files(
    'esys images',
    {
        'esys.png': bytes1.buffer.asUint8List(),
        'bluedan.png': bytes2.buffer.asUint8List(),
        'addresses.csv': bytes3.buffer.asUint8List(),
    },
    '*/*',
    text: 'My optional text.');