feat(clipboard): add image and file set/get APIs#6141
Open
ndonkoHenri wants to merge 23 commits intomainfrom
Open
feat(clipboard): add image and file set/get APIs#6141ndonkoHenri wants to merge 23 commits intomainfrom
ndonkoHenri wants to merge 23 commits intomainfrom
Conversation
Deploying flet-docs with
|
| Latest commit: |
5363f7c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e22f81d6.flet-docs.pages.dev |
| Branch Preview URL: | https://improve-clipboard.flet-docs.pages.dev |
Deploying flet-examples with
|
| Latest commit: |
5363f7c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1434e146.flet-examples.pages.dev |
| Branch Preview URL: | https://improve-clipboard.flet-examples.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new clipboard capabilities (images + file references) to Flet by extending the Python Clipboard service API and implementing corresponding Flutter-side handlers, alongside new integration tests and examples.
Changes:
- Extend Python
Clipboardservice withset_image/get_imageandset_files/get_filesAPIs, plus updated docs/examples. - Implement new clipboard method handlers on the Flutter client using the
pasteboardplugin and add supporting utility changes. - Add/enable integration tests for services (clipboard, battery, storage paths, shared preferences) and CI wiring.
Reviewed changes
Copilot reviewed 27 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/controls/services/clipboard.py | Adds image/file clipboard APIs and platform guards to Python service layer. |
| sdk/python/packages/flet/integration_tests/controls/services/test_storage_paths.py | Adds integration coverage for StoragePaths across supported/unsupported platforms. |
| sdk/python/packages/flet/integration_tests/controls/services/test_shared_preferences.py | Adds CRUD integration coverage for SharedPreferences. |
| sdk/python/packages/flet/integration_tests/controls/services/test_clipboard.py | Adds integration coverage for clipboard text/image/files behavior. |
| sdk/python/packages/flet/integration_tests/controls/services/test_battery.py | Adds integration coverage for Battery service. |
| sdk/python/packages/flet/integration_tests/conftest.py | Ensures ft.context.page is set during tests and prevents context leakage. |
| sdk/python/packages/flet/integration_tests/README.md | Documents how to run the new services integration tests. |
| sdk/python/packages/flet/docs/services/clipboard.md | Updates clipboard docs to include strings/images/files examples. |
| sdk/python/examples/services/clipboard/strings.py | Updates strings example to use controls=[...] argument style. |
| sdk/python/examples/services/clipboard/images.py | New example demonstrating image clipboard set/get. |
| sdk/python/examples/services/clipboard/files.py | New example demonstrating file reference clipboard set/get. |
| sdk/python/examples/controls/alert_dialog/media/modal_and_non_modal.gif | Media asset change included in PR. |
| sdk/python/examples/apps/flet_build_test/pyproject.toml | Adds Flutter dependency override for local flet package in build test app. |
| packages/flet/pubspec.yaml | Adds pasteboard dependency to enable image/files clipboard support. |
| packages/flet/lib/src/utils/images.dart | Exposes a reusable convertToUint8List() helper (rename from private). |
| packages/flet/lib/src/services/clipboard.dart | Implements new clipboard methods via pasteboard plugin. |
| packages/flet/lib/src/controls/cupertino_textfield.dart | Fixes box shadow property lookup key (shadow → shadows). |
| client/windows/flutter/generated_plugins.cmake | Registers pasteboard plugin for Windows client. |
| client/windows/flutter/generated_plugin_registrant.cc | Registers pasteboard plugin for Windows client (C++ registrant). |
| client/pubspec.lock | Records resolved pasteboard dependency in the client lockfile. |
| client/macos/Flutter/GeneratedPluginRegistrant.swift | Registers pasteboard plugin for macOS client. |
| client/linux/flutter/generated_plugins.cmake | Registers pasteboard plugin for Linux client. |
| client/linux/flutter/generated_plugin_registrant.cc | Registers pasteboard plugin for Linux client (C++ registrant). |
| client/ios/Runner.xcodeproj/project.pbxproj | Bumps iOS deployment target in Xcode project settings. |
| client/ios/Podfile.lock | Updates iOS pods lockfile to include new/updated dependencies. |
| client/ios/Podfile | Sets iOS platform minimum version to 14.0. |
| client/ios/Flutter/AppFrameworkInfo.plist | Bumps MinimumOSVersion to 14.0. |
| client/android/app/src/main/res/xml/provider_paths.xml | Adds FileProvider paths configuration used for file URI sharing. |
| client/android/app/src/main/AndroidManifest.xml | Adds FileProvider entry to support file URI grants. |
| .github/workflows/macos-integration-tests.yml | Enables running services integration tests in macOS CI job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdk/python/packages/flet/src/flet/controls/services/clipboard.py
Outdated
Show resolved
Hide resolved
sdk/python/packages/flet/integration_tests/controls/services/test_shared_preferences.py
Show resolved
Hide resolved
This reverts commit 495daf6.
… flet-color-pickers to extensions dep-group
sdk/python/packages/flet/src/flet/controls/services/clipboard.py
Outdated
Show resolved
Hide resolved
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.
Fix #349
Related to flet-dev/flet-build-template#75
Test code
Details
Summary by Sourcery
Add cross-platform clipboard support for images and files and strengthen service-related testing and platform integration.
New Features:
Bug Fixes:
Enhancements:
Build:
CI:
Documentation:
Tests: