colorToHex function

String colorToHex(
  1. Color color
)

Implementation

String colorToHex(Color color) =>
    '#${color.toARGB32().toRadixString(16).substring(2).toUpperCase()}';