Manual Hex Input (via TextEditingController) #54
Merged
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.
Hey, @mchome it's me again :)
I've added an optional, nullable hexInputController parameter to ColorPicker (which I believe can help you to close Issue #31 ), instead of providing some sort of TextField or changing ColorPickerLabel to editable. So it's not a breaking change.
It allows developers to add their own custom text fields with the ability to create tailor-made validators and formatters for them, from any place of theirs app. It's simply listening to this controller and do basic validation, via two new functions. Almost every line of code is commented on and documented. Also, 122 unit-tests for those two functions were added (since TextEditingController is well tested by Google already :)) and I did not add any widgets. However, I can add some widget tests if you wish to.
I'm open to any critics, and obviously, I'm ok if you don't like this approach, so you are free to close this PR.
Thanks again for your awesome color picker, the best one out there!
Best regards,
Roman