ColorToHex function

String ColorToHex(
  1. Color hexColor
)

Implementation

String ColorToHex(Color hexColor) {
  return '${hexColor}'
      .toUpperCase()
      .replaceAll("COLOR(0XFF", "#")
      .replaceAll(")", "");
}