cssExpression property
Returns the expression part of a CSS declaration. Declaration is:
property:expression;
E.g., if property is color then expression could be rgba(255,255,0) the CSS declaration would be 'color:rgba(255,255,0);'.
then _cssExpression would return 'rgba(255,255,0)'. See www.w3.org/TR/CSS21/grammar.html
Implementation
@override
String get cssExpression {
if (a == null) {
return '#${Color.convertToHexString(r, g, b)}';
} else {
return 'rgba($r,$g,$b,$a)';
}
}