Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albumname #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Albumname #1

wants to merge 5 commits into from

Conversation

basveenema
Copy link

No description provided.

Comment on lines 20 to 39
guard let imageData = (arguments["imageBytes"] as? FlutterStandardTypedData)?.data,
let image = UIImage(data: imageData),
let quality = arguments["quality"] as? Int,
let albumName = arguments["albumName"] as? String,
let _ = arguments["name"],
let isReturnImagePath = arguments["isReturnImagePathOfIOS"] as? Bool
else { return }
let newImage = image.jpegData(compressionQuality: CGFloat(quality / 100))!
saveImage(UIImage(data: newImage) ?? image, isReturnImagePath: isReturnImagePath)
saveImage(image: UIImage(data: newImage) ?? image, albumName: albumName, isReturnImagePath: isReturnImagePath)
} else if (call.method == "saveFileToGallery") {
guard let arguments = call.arguments as? [String: Any],
let path = arguments["file"] as? String,
let albumName = arguments["albumName"] as? String,
let _ = arguments["name"],
let isReturnFilePath = arguments["isReturnPathOfIOS"] as? Bool else { return }
if (isImageFile(filename: path)) {
saveImageAtFileUrl(path, isReturnImagePath: isReturnFilePath)
saveImage(url: path, albumName: albumName, isReturnImagePath: isReturnFilePath)
} else {
if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path)) {
saveVideo(path, isReturnImagePath: isReturnFilePath)
saveVideo(path, albumName: albumName, isReturnImagePath: isReturnFilePath)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je indentation staat niet goed. Of het is tabs vs spaces o.i.d.
Alleen als je het wilt insturen als echte PR zou ik er iets mee doen. Voor ons maakt het verder niet uit.
(We can re-indent selected code in Xcode by pressing Ctrl + I . To re-indent the whole file: Command + A then Ctrl + I)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants