Skip to content

Commit

Permalink
chore: update outdated TODOs as they moved to flutter#8079
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoEllet committed Nov 17, 2024
1 parent 869eb04 commit 5b54403
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/image_picker/image_picker_macos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
<!-- TODO(EchoEllet): It's possible to support those on file_selector implementation using the same platform API, should we support resizing and compressing for file_selector implementation? Will return new temp file path. -->
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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].
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5b54403

Please sign in to comment.