colorToString function

String colorToString(
  1. Color color
)

This will convert a Color to a hex string (more abreviated than the .toString() method.

Implementation

String colorToString(Color color) {
  return color.toString().split('(0x')[1].split(')')[0];
}