feat: make SharedPreferences support int, float, bool and list[str]#6267
Merged
FeodorFitsner merged 17 commits intomainfrom Mar 17, 2026
Merged
feat: make SharedPreferences support int, float, bool and list[str]#6267FeodorFitsner merged 17 commits intomainfrom
SharedPreferences support int, float, bool and list[str]#6267FeodorFitsner merged 17 commits intomainfrom
Conversation
…double, List<String>)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands SharedPreferences to support additional primitive value types end-to-end (Python SDK ↔ Flutter service), while also updating build CLI boolean parsing/help text and making several documentation improvements (publish guides + cookbook).
Changes:
- Extend
SharedPreferencesto supportint,float,bool, andlist[str](Python typing + Dart service implementation) and broaden integration test coverage. - Update
flet buildCLI boolean parsing to be case-insensitive for several flags and align related publish documentation/examples. - Add a new cookbook article (
Subprocess) and update MkDocs navigation; apply assorted docs/changelog/lockfile maintenance updates.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/controls/services/shared_preferences.py | Adds a SharedPreferencesValueType alias, tighter input validation, and improved docstrings. |
| packages/flet/lib/src/services/shared_preferences.dart | Implements multi-type set/get support using the platform shared_preferences API. |
| sdk/python/packages/flet/integration_tests/controls/services/test_shared_preferences.py | Extends CRUD integration test to cover new supported types and invalid inputs. |
| sdk/python/packages/flet-cli/src/flet_cli/commands/build_base.py | Makes several CLI boolean parsers case-insensitive and tweaks help text. |
| sdk/python/packages/flet/src/flet/auth/authorization_service.py | Adds an explicit return type to get_token(). |
| sdk/python/packages/flet/docs/publish/android.md | Docs updates for resolution order, boolean forms, and “template translation” examples. |
| sdk/python/packages/flet/docs/publish/ios.md | Docs updates for supported forms/examples and template-translation sections. |
| sdk/python/packages/flet/docs/publish/macos.md | Docs updates for supported forms/examples and template-translation sections. |
| sdk/python/packages/flet/docs/publish/index.md | Adds “template translation” details and updates deep-linking references/links. |
| sdk/python/packages/flet/docs/cookbook/subprocess.md | New cookbook recipe covering subprocess usage (non-web). |
| sdk/python/packages/flet/docs/cookbook/assets.md | Updates control link format for Image. |
| sdk/python/packages/flet/mkdocs.yml | Adds the new Subprocess cookbook page to navigation. |
| sdk/python/packages/flet-cli/src/flet_cli/commands/build.py | Adds a publish documentation link in the command docstring. |
| sdk/python/packages/flet-ads/CHANGELOG.md | Changelog entry formatting/version section update. |
| client/pubspec.lock | Updates pinned Dart transitive dependencies. |
| .codex/skills/prepare-flet-release/SKILL.md | Tightens release-prep instructions (author attribution + changelog scan guidance). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdk/python/packages/flet-cli/src/flet_cli/commands/build_base.py
Outdated
Show resolved
Hide resolved
sdk/python/packages/flet-cli/src/flet_cli/commands/build_base.py
Outdated
Show resolved
Hide resolved
sdk/python/packages/flet-cli/src/flet_cli/commands/build_base.py
Outdated
Show resolved
Hide resolved
sdk/python/packages/flet/src/flet/controls/services/shared_preferences.py
Outdated
Show resolved
Hide resolved
1 task
1 task
…OML arrays, and inline tables
Deploying flet-examples with
|
| Latest commit: |
302d3ca
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://756fd75b.flet-examples.pages.dev |
| Branch Preview URL: | https://improve-shared-prefs.flet-examples.pages.dev |
…ed CLI boolean parser
sdk/python/packages/flet-cli/src/flet_cli/commands/build_base.py
Outdated
Show resolved
Hide resolved
FeodorFitsner
approved these changes
Mar 17, 2026
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 #6304
Summary by Sourcery
Extend SharedPreferences to support multiple primitive types and lists while improving platform build configuration handling and documentation.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: