File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/core/lib/src/internal/parser Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ CssColor? tryParseColor(css.Expression? expression) {
1515 case 'hsla' :
1616 final params = expression.params;
1717 if (params.length >= 3 ) {
18- final [ param0, param1, param2] = params;
18+ final param0 = params[ 0 ] ;
1919 final double ? h;
2020 if (param0 is css.NumberTerm ) {
2121 h = _parseColorHue (param0.number);
@@ -25,13 +25,15 @@ CssColor? tryParseColor(css.Expression? expression) {
2525 h = null ;
2626 }
2727
28+ final param1 = params[1 ];
2829 final double ? s;
2930 if (param1 is css.PercentageTerm ) {
3031 s = param1.valueAsDouble.clamp (0.0 , 1.0 );
3132 } else {
3233 s = null ;
3334 }
3435
36+ final param2 = params[2 ];
3537 final double ? l;
3638 if (param2 is css.PercentageTerm ) {
3739 l = param2.valueAsDouble.clamp (0.0 , 1.0 );
You can’t perform that action at this time.
0 commit comments