v1: Replace Colors.BLACK{shade} with BLACK_{shade}, WHITE{shade} with WHITE_{shade}#5752
Merged
FeodorFitsner merged 6 commits intomainfrom Oct 28, 2025
Merged
v1: Replace Colors.BLACK{shade} with BLACK_{shade}, WHITE{shade} with WHITE_{shade}#5752FeodorFitsner merged 6 commits intomainfrom
Colors.BLACK{shade} with BLACK_{shade}, WHITE{shade} with WHITE_{shade}#5752FeodorFitsner merged 6 commits intomainfrom
Conversation
Corrects logic in Observable to set attribute directly if it does not exist, preventing unnecessary value comparison and notification for new attributes.
Simplifies logic for setting attributes by removing redundant checks and directly handling cases where the attribute may not exist. This improves code clarity and maintains correct notification behavior.
Moves attribute assignment before value comparison in Observable.__setattr__ to ensure correct notification behavior when attribute values change.
Introduced DeprecatedEnumMeta to support deprecated enum members and added deprecated color aliases to the Colors enum for backward compatibility. Deprecated aliases now emit a DeprecationWarning and redirect to the new member names. Also updated __all__ and imports to expose DeprecatedEnumMeta.
Replaces deprecated color constants like BLACK54, WHITE24, etc. with their new underscore-named versions (e.g., BLACK_54, WHITE_24) across all example, tutorial, and documentation files for consistency with the latest Flet API.
Colors.BLACK{shade} with Colors.BLACK_{shade}, Colors.WHITE{shade} with Colors.WHITE_{shade}Colors.BLACK{shade} with BLACK_{shade}, WHITE{shade} with WHITE_{shade}
Deploying flet-docs with
|
| Latest commit: |
a386059
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://61ddb42a.flet-docs.pages.dev |
| Branch Preview URL: | https://v1-color-deprecations.flet-docs.pages.dev |
ndonkoHenri
approved these changes
Oct 27, 2025
Contributor
|
#5736 (comment) |
Contributor
Author
Sure, it's already here: https://docs.flet.dev/controls/dismissible/?h=dismiss#remove-dismissible-on_dismiss-inside-component |
Added a TODO comment indicating that deprecated color aliases should be removed in Flet 1.0. This helps track planned cleanup for future releases.
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.
Summary by Sourcery
Rename black and white opacity enum members to include an underscore, introduce a deprecation meta to alias and warn on the old names, update internal imports and utility exports, refine attribute setting in Observable, and adjust documentation and examples to use the new color names.
New Features:
Enhancements:
Documentation:
Chores: