Repository navigation
Conversation
The photo library picker always used PHPickerConfiguration.Selection.ordered, added in #2047 to keep results in selection order. Ordered selection also disables selecting several items by swiping across the grid, so users of apps that pick many photos have to tap each one. Add DarwinOptions.orderedSelection, true by default so the order keeps being guaranteed, and only apply .ordered when it is enabled. Apps that do not care about the order can set it to false to restore swipe to select. The example gets a toggle for it. Bumps file_picker_platform_interface to 4.1.0 and file_picker_darwin to 2.2.0. Fixes #2241
The doc said it had no effect with the iOS document picker, which does not tell which FileType uses which picker. Name image, video and media, the types that go through the photo library picker.
79efba3 picked up a local DEVELOPMENT_TEAM change to the example's Xcode project by accident.
Owner
Author
|
Heads up @navaronbracke: could #2244 land before this one? Both bump |
navaronbracke
requested changes
Oct 10, 2026
|
|
||
| test('pickFile and pickFiles send orderedSelection', () async { | ||
| final picker = FilePickerDarwin(); | ||
| bool? received; |
Collaborator
There was a problem hiding this comment.
Suggested change
| bool? received; | |
| bool? orderedSelection; |
| ); | ||
| expect(received, isFalse); | ||
|
|
||
| await picker.pickFile( |
Collaborator
There was a problem hiding this comment.
await picker.pickFile(type: FileType.media); is not tested (the default for pickFile)
| ## 2.2.0 | ||
|
|
||
| - Added support for `DarwinOptions.orderedSelection`. Setting it to `false` restores swipe to select in the iOS photo library picker, which ordered selection disables. [#2241](https://github.com/vicajilau/flutter_file_picker/issues/2241) | ||
| - Raised the `file_picker_platform_interface` lower bound to `^4.1.0`. |
Collaborator
There was a problem hiding this comment.
THis line is redundant, since the lockfile will tell the user
- Raised the `file_picker_platform_interface` lower bound to `^4.1.0`.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2241
Problem
Since 12.x the iOS photo library picker always uses
PHPickerConfiguration.Selection.ordered, added in #2047 to keep the results in selection order (#1866). Ordered selection also disables selecting several items by swiping across the grid, so users have to tap every photo one by one, which is a real regression for apps that pick many photos at once.#2047 made two changes: it stores the results by index, which keeps them in the order
PHPickerreturns them, and it enables.ordered. Only.orderedis documented to return the results in the order the user selected them, so simply removing it could bring #1866 back.Change
DarwinOptions.orderedSelection,trueby default, so the selection order keeps being guaranteed and nothing changes for existing apps.IOSFilePickerHandleronly applies.orderedwhen it is enabled. Apps that do not care about the order can set it tofalseto restore swipe to select.file_picker_platform_interface4.1.0 (new field) andfile_picker_darwin2.2.0, which raises its interface lower bound to^4.1.0.Testing
trueby default andfalsewhen disabled, for bothpickFile()andpickFiles().PHPickercannot be driven from tests, so this still needs a manual check: with the toggle on, swipe to select stays disabled and the photos come back in selection order, and with it off, swipe to select works.