esys_flutter_share 1.0.0 copy "esys_flutter_share: ^1.0.0" to clipboard
esys_flutter_share: ^1.0.0 copied to clipboard

outdated

A Flutter plugin for sharing images & text with other applications.

esys_flutter_share #

A Flutter plugin for sharing files & text with other applications.

Usage #

Import:

import 'package:esys_flutter_share/esys_flutter_share.dart';

Share text:

Share.text('my text title', 'This is my text to share with other applications.', 'text/plain');

Share file:

final ByteData bytes = await rootBundle.load('assets/image1.png');
await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png');

Share files:

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(),
    },
    '*/*');

Share file from url:

var request = await HttpClient().getUrl(Uri.parse('https://shop.esys.eu/media/image/6f/8f/af/amlog_transport-berwachung.jpg'));
var response = await request.close();
Uint8List bytes = await consolidateHttpClientResponseBytes(response);
await Share.file('ESYS AMLOG', 'amlog.jpg', bytes, 'image/jpg');

Check out the example app in the Repository for further information.

214
likes
0
pub points
91%
popularity

Publisher

unverified uploader

A Flutter plugin for sharing images & text with other applications.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, path_provider

More

Packages that depend on esys_flutter_share