[file_selector] Add canCreateDirectories to FileDialogOptions#10317
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a canCreateDirectories option to FileDialogOptions, allowing control over directory creation in file dialogs. The change is implemented by adding new ...WithOptions methods to the FileSelectorPlatform interface and deprecating the older methods with discrete parameters. This is a good, non-breaking approach to extending the API. The changes are consistent across the platform interface, data types, and tests. The new tests correctly verify the backward-compatible fallback mechanism. The changelog and version have been updated accordingly. The implementation is solid and follows best practices for platform interface packages.
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM
@tarrinneal for secondary approval.
flutter/packages@4cec230...7063d75 2025-11-11 [email protected] [video_player_avfoundation] removes unnecessary duration and size check before sending the initialized event (flutter/packages#9534) 2025-11-11 [email protected] Update Android package CODEOWNERS (flutter/packages#10386) 2025-11-11 [email protected] [url_launcher] Remove unused dartHostTestHandler (flutter/packages#10324) 2025-11-11 [email protected] [path_provider] Remove use of Pigeon's Dart test generator (flutter/packages#10323) 2025-11-11 [email protected] [image_picker] Remove use of Pigeon's Dart test generator (flutter/packages#10320) 2025-11-11 [email protected] [shared_preferences] Remove use of Pigeon's Dart test generator (flutter/packages#10325) 2025-11-10 [email protected] [camera_android_camerax] Fixes crash with unsupported operation exception (flutter/packages#10342) 2025-11-10 [email protected] [file_selector] Remove unused web code (flutter/packages#10376) 2025-11-10 [email protected] Manual roll Flutter from c5e809a to 31a8481 (9 revisions) (flutter/packages#10392) 2025-11-10 [email protected] [file_selector] Add canCreateDirectories to FileDialogOptions (flutter/packages#10317) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4cec230...7063d75 2025-11-11 [email protected] [video_player_avfoundation] removes unnecessary duration and size check before sending the initialized event (flutter/packages#9534) 2025-11-11 [email protected] Update Android package CODEOWNERS (flutter/packages#10386) 2025-11-11 [email protected] [url_launcher] Remove unused dartHostTestHandler (flutter/packages#10324) 2025-11-11 [email protected] [path_provider] Remove use of Pigeon's Dart test generator (flutter/packages#10323) 2025-11-11 [email protected] [image_picker] Remove use of Pigeon's Dart test generator (flutter/packages#10320) 2025-11-11 [email protected] [shared_preferences] Remove use of Pigeon's Dart test generator (flutter/packages#10325) 2025-11-10 [email protected] [camera_android_camerax] Fixes crash with unsupported operation exception (flutter/packages#10342) 2025-11-10 [email protected] [file_selector] Remove unused web code (flutter/packages#10376) 2025-11-10 [email protected] Manual roll Flutter from c5e809a to 31a8481 (9 revisions) (flutter/packages#10392) 2025-11-10 [email protected] [file_selector] Add canCreateDirectories to FileDialogOptions (flutter/packages#10317) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4cec230...7063d75 2025-11-11 [email protected] [video_player_avfoundation] removes unnecessary duration and size check before sending the initialized event (flutter/packages#9534) 2025-11-11 [email protected] Update Android package CODEOWNERS (flutter/packages#10386) 2025-11-11 [email protected] [url_launcher] Remove unused dartHostTestHandler (flutter/packages#10324) 2025-11-11 [email protected] [path_provider] Remove use of Pigeon's Dart test generator (flutter/packages#10323) 2025-11-11 [email protected] [image_picker] Remove use of Pigeon's Dart test generator (flutter/packages#10320) 2025-11-11 [email protected] [shared_preferences] Remove use of Pigeon's Dart test generator (flutter/packages#10325) 2025-11-10 [email protected] [camera_android_camerax] Fixes crash with unsupported operation exception (flutter/packages#10342) 2025-11-10 [email protected] [file_selector] Remove unused web code (flutter/packages#10376) 2025-11-10 [email protected] Manual roll Flutter from c5e809a to 31a8481 (9 revisions) (flutter/packages#10392) 2025-11-10 [email protected] [file_selector] Add canCreateDirectories to FileDialogOptions (flutter/packages#10317) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4cec230...7063d75 2025-11-11 [email protected] [video_player_avfoundation] removes unnecessary duration and size check before sending the initialized event (flutter/packages#9534) 2025-11-11 [email protected] Update Android package CODEOWNERS (flutter/packages#10386) 2025-11-11 [email protected] [url_launcher] Remove unused dartHostTestHandler (flutter/packages#10324) 2025-11-11 [email protected] [path_provider] Remove use of Pigeon's Dart test generator (flutter/packages#10323) 2025-11-11 [email protected] [image_picker] Remove use of Pigeon's Dart test generator (flutter/packages#10320) 2025-11-11 [email protected] [shared_preferences] Remove use of Pigeon's Dart test generator (flutter/packages#10325) 2025-11-10 [email protected] [camera_android_camerax] Fixes crash with unsupported operation exception (flutter/packages#10342) 2025-11-10 [email protected] [file_selector] Remove unused web code (flutter/packages#10376) 2025-11-10 [email protected] Manual roll Flutter from c5e809a to 31a8481 (9 revisions) (flutter/packages#10392) 2025-11-10 [email protected] [file_selector] Add canCreateDirectories to FileDialogOptions (flutter/packages#10317) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This is the platform interface update for #9965
Part of: flutter/flutter#141339
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3