feat(FilePicker): add compression_quality and cancel_upload_on_window_blur to pick_files()#6573
Merged
Merged
Conversation
Deploying flet-website-v2 with
|
| Latest commit: |
1a49bfd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9db4990f.flet-website-v2.pages.dev |
| Branch Preview URL: | https://file-picker-improvements.flet-website-v2.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Flutter file_picker dependency and adapts the Dart service to the new static FilePicker.* API, while exposing new pick_files() capabilities to the Python SDK and improving related API documentation.
Changes:
- Bump Flutter
file_pickerfrom^10.3.10to^11.0.2and migrate service calls toFilePicker.pickFiles()/saveFile()/getDirectoryPath(). - Add
compression_qualityandcancel_upload_on_window_blurparameters to PythonFilePicker.pick_files()and forward them through to the Flutter service. - Improve Python API documentation (FilePicker.save_file behavior; richer docs for
FloatingActionButtonLocationenum members).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/controls/types.py | Adds detailed per-enum-member docs for FloatingActionButtonLocation. |
| sdk/python/packages/flet/src/flet/controls/services/file_picker.py | Adds new pick_files() parameters, forwards them to the backend, and updates save_file() docs. |
| packages/flet/pubspec.yaml | Upgrades file_picker dependency to ^11.0.2. |
| packages/flet/lib/src/services/file_picker.dart | Migrates to FilePicker static API and wires new pick-files arguments. |
| CHANGELOG.md | Documents the new parameters and the web blur-cancel workaround (Issue #771). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ovements # Conflicts: # CHANGELOG.md
Contributor
|
Re-target it to flet-0.86 |
…ovements # Conflicts: # CHANGELOG.md
FeodorFitsner
added a commit
that referenced
this pull request
Jun 18, 2026
Pulls 6 commits from the flet-0.86 release branch: * feat(FilePicker): compression_quality + cancel_upload_on_window_blur on pick_files() (#6573) * fix(android): pickFirsts libc++_shared.so (#6571) * chore: docs + code improvements across packages/flet Dart controls (#6589) * fix(typing): explicit handler signatures in PubSubClient (#6564) * feat(cli): flet clean command + deprecate --clear-cache (#6590) * fix(flet-secure-storage): bump flutter_secure_storage 10.0.0 -> 10.3.1 (#6586) Conflicts and resolutions: * sdk/python/templates/build/{{cookiecutter.out_dir}}/android/app/build.gradle.kts flet-0.86's #6571 reinstates useLegacyPackaging + keepDebugSymbols + pickFirsts inside packaging.jniLibs. dart-bridge intentionally dropped useLegacyPackaging / keepDebugSymbols because serious_python's new native-mmap loader makes them redundant (CHANGELOG 0.86.0 Improvements). The libc++_shared.so collision is a different problem (multi-plugin jniLibs duplication, not Python extraction), so keep just the pickFirsts block. Restructured the packaging block I added in the previous commit so pickFirsts is unconditional and excludes stays gated on android_excluded_abis. * CHANGELOG.md Merged the new-features and bug-fixes sections preserving entries from both branches: dart-bridge's DataChannel + in-process dart_bridge + multi-version Python (with the corrected 314.0.0 GA / sp >= 3.0.0 blurb that supersedes flet-0.86's 314.0.0a2 / sp >= 2.0.0 stub), plus flet-0.86's flet clean, compression_quality, libc++_shared fix, PubSubClient typing, and FilePicker pick_files entry. Documentation subsection from flet-0.86 added. * sdk/python/packages/flet-secure-storage/.../pubspec.yaml Took flet-0.86's pinned `flutter_secure_storage: 10.3.1` over dart-bridge's `^10.0.0` caret range. * website/docs/updates/breaking-changes/index.md Kept dart-bridge's #### Breaking changes subsection and added flet-0.86's #### Deprecations subsection beneath it. * tests/test_python_versions.py (post-merge follow-up, not a conflict) Updated the local fixture manifest to carry android_abis on every row. Required because the manifest-driven PythonRelease parser no longer falls back to an inferred ABI list — the fixtures must reflect the same schema as python-build's 20260618+ releases. Verification: ruff clean on touched files; 62 flet-cli unit tests pass; imports succeed for build_base, build, clean, python_versions, android. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Upgrades the
file_pickerpackage from^10.3.10to^11.0.2(migrating to its new static API —FilePicker.pickFiles()instead ofFilePicker.platform.pickFiles()) and exposes some of its capabilities:FilePicker.pick_files()parameters:compression_quality: int = 0— image compression quality from0to100, used on supported platforms.0(default) disables compression.cancel_upload_on_window_blur: bool = True— web-only. Controls whether browser window blur is treated as a cancelled selection. PassingFalseprevents valid file selections from being reported as cancelled when the window loses focus during picking on slow machines or slow network shares. FixesFilePickertimes out when picking files on a slow network #771.FilePicker.save_file()documentation now reflects actual desktop behavior: the dialog returns the chosen path and, ifsrc_bytesis provided, those bytes are written to the selected file (instead of claiming the file is never created).FloatingActionButtonLocationenum members now each have proper API docs instead of a bare link to the Flutter docs.Summary by Sourcery
Add configurable image compression and window-blur handling to file picking, align FilePicker usage with the new static API, and improve related documentation.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation: