saveImage method
Implementation
Future<AssetEntity?> saveImage(
typed_data.Uint8List data, {
required String? title,
String? desc,
String? relativePath,
}) async {
final Map<dynamic, dynamic>? result = await _channel.invokeMethod(
PMConstants.mSaveImage,
<String, dynamic>{
'image': data,
'title': title,
'desc': desc ?? '',
'relativePath': relativePath,
...onlyAddPermission,
},
);
if (result == null) {
return null;
}
return ConvertUtils.convertMapToAsset(
result.cast<String, dynamic>(),
title: title,
);
}