Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separated TextBox Decorations #987

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

hassony105
Copy link

Separates TextBox Decorations into:

1- focusedDecoration
2- unFocusedDecoration
3- focusedForegroundDecoration
4- unFocusedForegroundDecoration

Bocuse the color of the TextBox ForegroundDecoration border color changes only from Theme or changing the whole Border, so i have made a changes on the Whole decorations in the TextBox.

For Your Knowledge: I don't know why I did this pull request maybe I was drunk maybe I was sleepy

separates the decoration of TextBox into:
1- focusedDecoration
2- unFocusedDecoration
3- focusedForegroundDecoration
4- unFocusedForegroundDecoration
@bdlukaa
Copy link
Owner

bdlukaa commented Dec 20, 2023

Hello! Thank you for this pull request.

I like the idea of having a different decoration for different states, but the way you proposed is a bit limiting. It'd be nice to have it like buttons do: with a ButtonState.

TextBox(
  decoration: ButtonState.all(BoxDecoration(
    ...
  )),
)

@hassony105
Copy link
Author

do you mean that you want me to replace these:

focusedDecoration
unFocusedDecoration

focusedForegroundDecoration
unFocusedForegroundDecoration

with ButtonState<BoxDecoration> decoration, ButtonState<BoxDecoration> foregroundDecoration ?

@bdlukaa
Copy link
Owner

bdlukaa commented Dec 21, 2023

yes! what do you think?

@hassony105
Copy link
Author

OK, It is a pretty idea. I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants