You can convert the value property (includes alpha) or the individual red, green, and blue properties to Hex using int.toRadixString(16):
var myColor = Colors.blue;
var hex = '#${myColor.value.toRadixString(16)}';
You can convert the value property (includes alpha) or the individual red, green, and blue properties to Hex using int.toRadixString(16):
var myColor = Colors.blue;
var hex = '#${myColor.value.toRadixString(16)}';