saveImage method

Future<AssetEntity?> saveImage(
  1. Uint8List data, {
  2. String? title,
  3. String? desc,
  4. String? relativePath,
})

Save image to gallery.

in iOS is Recent. in Android is Picture. On Android 28 or lower, if the file is located in the external storage, it's path will be used in the MediaStore. On Android 29 or above, you can use relativePath to specify a RELATIVE_PATH used in the MediaStore. The mimeType will either be formed from the title if you pass one, or guessed by the system, which does not always work.

Implementation

Future<AssetEntity?> saveImage(
  Uint8List data, {
  String? title,
  String? desc,
  String? relativePath,
}) async {
  return _plugin.saveImage(data,
      title: title, desc: desc, relativePath: relativePath);
}