Flutter convert Color to hex string. You can convert the value property (includes alpha) or the individual red, green, and blue properties to Hex using int.toRadixString(16):
1 2 | var myColor = Colors.blue; var hex = '#${myColor.value.toRadixString(16)}'; |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.