hexFromColor static method

String hexFromColor({
  1. Color? color,
})

Get the hex code for the color.

# is added to the start of the hex code.

Implementation

static String hexFromColor({Color? color}) => (color != null) ? "#${color.hex}" : "";