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