How to use Hexadecimal color codes in Flutter

Normally, in Flutter you can mostly find predefined colors by doing something like:

What about if you want to assign your own color code? That’s easy. Use this format:


Replace COLOR_CODE with the color code you want to use E.g

Color(0xFFFFFFFF) //white
Color(0xFF000000) //black

Add a Comment