From 5b54403f42849aea24fdcaacdd1f7acd028ad785 Mon Sep 17 00:00:00 2001 From: Ellet Date: Thu, 14 Nov 2024 13:41:17 +0300 Subject: [PATCH] chore: update outdated TODOs as they moved to https://github.com/flutter/packages/pull/8079 --- packages/image_picker/image_picker_macos/README.md | 3 +-- .../image_picker_macos/lib/image_picker_macos.dart | 2 +- .../Sources/image_picker_macos/ImagePickerImpl.swift | 2 +- .../image_picker_macos/test/image_picker_macos_test.dart | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/image_picker/image_picker_macos/README.md b/packages/image_picker/image_picker_macos/README.md index ac1bd85bc2c8..9faa8ca266d9 100644 --- a/packages/image_picker/image_picker_macos/README.md +++ b/packages/image_picker/image_picker_macos/README.md @@ -34,8 +34,7 @@ have them as files on their desktop. The macOS Photos app supports importing ima `ImageSource.camera` is not supported unless a `cameraDelegate` is set. ### pickImage() - -The arguments `maxWidth`, `maxHeight`, `imageQuality` and `limit` are only supported when using the [PHPicker](#phpicker) implementation; they are not available in the default [file_selector][5] implementation. +The arguments `maxWidth`, `maxHeight`, `imageQuality`, and `limit` are only supported when using the [PHPicker](#phpicker) implementation; they are not available in the default [file_selector][5] implementation. The argument `requestFullMetadata` is unsupported on macOS. diff --git a/packages/image_picker/image_picker_macos/lib/image_picker_macos.dart b/packages/image_picker/image_picker_macos/lib/image_picker_macos.dart index d509d019a3c1..076629fdb61f 100644 --- a/packages/image_picker/image_picker_macos/lib/image_picker_macos.dart +++ b/packages/image_picker/image_picker_macos/lib/image_picker_macos.dart @@ -47,7 +47,7 @@ class ImagePickerMacOS extends CameraDelegatingImagePickerPlatform { /// Supports picking an image, multi-image, video, media, and multiple media. bool useMacOSPHPicker = false; - // TODO(EchoEllet): shouldUsePHPicker() and supportsPHPicker() should not be public, avoid using @visibleForTesting + // TODO(EchoEllet): avoid using @visibleForTesting per https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#avoid-using-visiblefortesting /// Return `true` if the current macOS version supports [useMacOSPHPicker]. /// diff --git a/packages/image_picker/image_picker_macos/macos/image_picker_macos/Sources/image_picker_macos/ImagePickerImpl.swift b/packages/image_picker/image_picker_macos/macos/image_picker_macos/Sources/image_picker_macos/ImagePickerImpl.swift index f6cb5649ceee..f33da3172b09 100644 --- a/packages/image_picker/image_picker_macos/macos/image_picker_macos/Sources/image_picker_macos/ImagePickerImpl.swift +++ b/packages/image_picker/image_picker_macos/macos/image_picker_macos/Sources/image_picker_macos/ImagePickerImpl.swift @@ -327,7 +327,7 @@ extension NSItemProvider { /// - Returns: The image file type (`png` or `jpeg`). func imageFileType(quality: Int64?) -> NSBitmapImageRep.FileType { let shouldCompress = shouldCompressImage(quality: quality) - // TODO(EchoEllet): The picked image can be JPEG even if it can represented as a PNG + // TODO(EchoEllet): The picked image can be JPEG even if it can represented as a PNG, should we always store as PNG in case quality is 100 but the image itself is JPEG or other type? return shouldCompress ? NSBitmapImageRep.FileType.jpeg : NSBitmapImageRep.FileType.png } diff --git a/packages/image_picker/image_picker_macos/test/image_picker_macos_test.dart b/packages/image_picker/image_picker_macos/test/image_picker_macos_test.dart index 8d5bab85cbc6..bfa54f6f46fd 100644 --- a/packages/image_picker/image_picker_macos/test/image_picker_macos_test.dart +++ b/packages/image_picker/image_picker_macos/test/image_picker_macos_test.dart @@ -529,7 +529,6 @@ void main() { }, ); - // TODO(EchoEllet): Improve the test names for this and all related in this file test( 'getVideo uses file selector when PHPicker is disabled', () async {