fromHex property
Color
get
fromHex
Format: 'aabbcc' or 'ffaabbcc' with an optional leading '#'.
Implementation
Color get fromHex {
final StringBuffer buffer = StringBuffer();
if (length == 6 || length == 7) {
buffer.write('ff');
}
buffer.write(replaceFirst('#', ''));
return Color(int.parse(buffer.toString(), radix: 16));
}