saveVideo method
Implementation
Future<AssetEntity?> saveVideo(
File file, {
required String? title,
String? desc,
String? relativePath,
}) async {
if (!file.existsSync()) {
assert(false, 'File must exists.');
return null;
}
final Map<dynamic, dynamic>? result = await _channel.invokeMethod(
PMConstants.mSaveVideo,
<String, dynamic>{
'path': file.absolute.path,
'title': title,
'desc': desc ?? '',
'relativePath': relativePath,
...onlyAddPermission,
},
);
if (result == null) {
return null;
}
return ConvertUtils.convertMapToAsset(
result.cast<String, dynamic>(),
title: title,
);
}