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.
Changes:
Changed all the extension names
added additional methods to make them more versatile: such as the methods "isColor" and "colorFromName"
fixed a bug on "colorFromHex" method that was updating the "hexToParse" string twice. because 2 "if" statements where executing in a row. That's why I am using "else if"
made it throw an exception when validation is not complete, instead of throwing a null; to stick to conventions.
removed a null check of "intColor" because if the algorithm is correct, there is no reason to check for null. If the logic is incorrect then, to code should throw an exception and we should fix the algorithm accordingly. This forces us to do things correct.
In colors.dart, that extension should not be there. So, I removed it... left everything else the same.
please squash my commits if you can. I accidentally made some other changes, and I had to write a couple more commits to undo them. just ignore them and squash them.