memoryToFile static method
Handle memory source and get file result.
Implementation
static Future<String> memoryToFile(
Uint8List memory,
ImageEditorOption option,
String targetPath,
) async {
if (option.options.isEmpty || option.canIgnore) {
return (File(targetPath)..writeAsBytesSync(memory)).path;
}
return await channel.invokeMethod('memoryToFile', {
'image': memory,
'target': targetPath,
'options': option.toJson(),
'fmt': option.outputFormat.toJson(),
});
}