saveFile static method

Future saveFile(
  1. String file, {
  2. String? name,
  3. bool isReturnPathOfIOS = false,
  4. bool isReturnIdOfIOS = false,
})

Save the PNG,JPG,JPEG image or video located at file to the local device media gallery.

Implementation

static Future saveFile(String file,
    {String? name,
    bool isReturnPathOfIOS = false,
    bool isReturnIdOfIOS = false}) async {
  final result =
      await _channel.invokeMethod('saveFileToGallery', <String, dynamic>{
    'file': file,
    'name': name,
    'isReturnPathOfIOS': isReturnPathOfIOS,
    'isReturnIdOfIOS': isReturnIdOfIOS
  });
  return result;
}