saveImageWithPath method
Implementation
Future<AssetEntity> saveImageWithPath(
String inputFilePath, {
String? title,
String? desc,
String? relativePath,
int? orientation,
}) async {
_throwIfOrientationInvalid(orientation);
final File file = File(inputFilePath);
if (!file.existsSync()) {
throw ArgumentError('The input file $inputFilePath does not exists.');
}
final Map result = await _channel.invokeMethod(
PMConstants.mSaveImageWithPath,
<String, dynamic>{
'path': file.absolute.path,
'title': title,
'desc': desc,
'relativePath': relativePath,
'orientation': orientation,
...onlyAddPermission,
},
);
return ConvertUtils.convertMapToAsset(result.cast(), title: title);
}