I am converting a Color to a String. I am then converting the Color to a String. Unfortunately when I want to convert it back into a Color the operation fails:
<
Use the following code to get hex value of the color.
Color color = Colors.red; var hexCode = '#${color.value.toRadixString(16).substring(2, 8)}';