aarajput / wc_flutter_share

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

Share from file path #36

Open Elf80lvl opened 2 years ago

Elf80lvl commented 2 years ago

Can I share an image which is stored as file with a path? When I try to do so I get an error: Unable to load asset: /data/user/0/com.example.qr_code_scanner/cache/image.png

final ByteData bytes = await rootBundle.load(file.path); await WcFlutterShare.share( sharePopupTitle: 'share', fileName: 'share.png', mimeType: 'image/png', bytesOfFile: bytes.buffer.asUint8List());