HEX COLOR TO FLUTTER code example

Example 1: how to use hexadecimal color in flutter

Color myColor = Color(0xff123456) 

// where 123456 is your hex color code and
// 0xff is the opacity value and can be changed.

Example 2: flutter color hex

const color = const Color(0xffb74093); // Second `const` is optional in assignments.

Example 3: flutter hex color

Color myHexColor = Color(0xff123456) 

// her you notice I use the 0xff and that is opacity or transparency of the color 
// and you can also change these value .

Tags:

Misc Example