saveFile2Album static method
将图片文件保存到相册,返回路径
Implementation
static Future<SaveResult?> saveFile2Album(String filePath, {String? fileName,}) async {
var permResult = await _requestPermission();
if(permResult.isGranted || permResult.isLimited){
final result = await ImageGallerySaver.saveFile(filePath,
name: fileName, isReturnPathOfIOS: true);
return SaveResult(path: result["filePath"],);
}
return SaveResult(permissionDenied: true);
}