Image_gallery_saver dart package not saving image to my gallery

Hi ,
I updated my flutter SDK and gradle too.
However everything working fine . But image gallery saver dart package is not saving image to my gallery.
I am not getting any error in my flutter run .

  1. first check the 2 permission in Android manifest
    -READ_EXTERNAL_STORAGE
    -WRITE_EXTERNAL_STORAGE

2 use this method

_saveScreen() async {
RenderRepaintBoundary boundary =
_globalKey.currentContext.findRenderObject();
ui.Image image = await boundary.toImage();
ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png);
final result =
await ImageGallerySaver.saveImage(byteData.buffer.asUint8List());
print(result);
_toastInfo(result.toString());
}
1 Like