shareAs static method
Shares an image via Share-dialog.
If quality, size or dpi are given, they will be applied before sharing the image.
Default: JPG.
Sharing on Web
Sharing on Web does not work. Use saveToJpg() instead.
How to get the render box:
if(context.mounted) {
final RenderBox? box = context.findRenderObject() as RenderBox?;
}
Implementation
static Future<void> shareAs(
String title,
String message,
Uint8List bytes,
final RenderBox? box, {
int quality = 100,
Size? size,
int? dpi,
int rotate = 0,
ImageFormat format = ImageFormat.jpeg,
}) async {
return ImageSave.shareAs(title, message, bytes, box,
quality: quality, size: size, dpi: dpi, rotate: rotate, format: format);
}