I want to convert the string to color but I can't,
My Code
String color = "0xffff5252";
Color result= Color(int.parse(color, radix: 16));
print("$result");
** I get the following problem**
Invalid radix-16 number (at character 1) 0xffff5252
if youe motive is to define a color by first defining into string and then by parsing it, then there's a much simpler way to define color,
const Color primary = Color(0xFF92A3FD);
const Color secondary = Color(0xFF9DCEFF);
const Color thirdColor = Color(0xFFC58BF2);
const Color fourthColor = Color(0xFFEEA4CE);
const Color bgTextField = Color(0xFFF7F8F8);
const Color facebookColor = Color(0xFF3b5998);
const Color googleColor = Color(0xFFDB4437);
radix