Fix issue where decoration widget covers selected item in list #154
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.
Description:
This pull request aims to fix an issue where, if the decoration value is set to a non-transparent widget (e.g., a solid red box), the selected value in the list gets completely covered by the decoration. The fix ensures that the selected value always remains visible above the decoration, regardless of its transparency.
Summary of Changes
Moved the _NumberPickerSelectedItemDecoration value to be generated before the list, ensuring that it appears underneath the list items.
This ensures that, whether the decoration is transparent or not, the selected item always appears above it.
Motivation
When using the library with a non-transparent decoration, the selected item in the list would be completely covered, affecting user experience. This change ensures that the selected item is always displayed clearly and correctly.
How to Test
Set the decoration for the widget to a non-transparent solid red box.
Verify that the selected value remains clearly visible above the decoration.
Change the decoration to other types (transparent, non-transparent) to test stability.