saveImage method

Future<AssetEntity?> saveImage(
  1. Uint8List data, {
  2. required String? title,
  3. String? desc,
  4. String? relativePath,
})

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,
  );
}