How to make hexadecimal color strings in Flutter

Header
In Flutter, the Color class can be constructed in a few different ways.
The simplest one is to use an integer value in relevant constructor.
The other simpler way maybe, to create color is from `RGB related constructors:
Notice that the values can be expressed in any form as long as it is integer.
Usually the problem is that we want to create color from a hexadecimal string in flutter. In such a cases, we need to convert the string to a string.
One thing to remember that for the int
constructor, we have to have the opacity ( FF by default ), in front.
If you want to do this dynamically in your program, the best way to achieve this is to use an (extension method)[https://dart.dev/language/extension-methods] on the color class. The extension method would be
Then you can use it like