@@ -162,7 +162,7 @@ class GradientColorParser {
162
162
continue ;
163
163
}
164
164
if (i == colorStopPositions.length - 1 && position >= colorStopPosition) {
165
- return colorStopColors[i].withValues (alpha: opacity);
165
+ return colorStopColors[i].withValues (alpha: opacity);
166
166
}
167
167
// We found the position in which position is between i - 1 and i.
168
168
var distanceBetweenColors =
@@ -171,9 +171,9 @@ class GradientColorParser {
171
171
var percentage = distanceToLowerColor / distanceBetweenColors;
172
172
var upperColor = colorStopColors[i];
173
173
var lowerColor = colorStopColors[i - 1 ];
174
- return GammaEvaluator .evaluate (
175
- percentage, lowerColor.withValues (alpha: 1 ), upperColor.withValues (alpha: 1 ))
176
- .withValues (alpha: opacity);
174
+ return GammaEvaluator .evaluate (percentage,
175
+ lowerColor.withValues (alpha: 1 ), upperColor.withValues (alpha: 1 ))
176
+ .withValues (alpha: opacity);
177
177
}
178
178
throw Exception ('Unreachable code.' );
179
179
}
@@ -182,7 +182,7 @@ class GradientColorParser {
182
182
List <double > opacityStopPositions, List <double > opacityStopOpacities) {
183
183
if (opacityStopOpacities.length < 2 ||
184
184
position <= opacityStopPositions[0 ]) {
185
- return color.withValues (alpha: opacityStopOpacities[0 ]);
185
+ return color.withValues (alpha: opacityStopOpacities[0 ]);
186
186
}
187
187
for (var i = 1 ; i < opacityStopPositions.length; i++ ) {
188
188
var opacityStopPosition = opacityStopPositions[i];
@@ -202,7 +202,7 @@ class GradientColorParser {
202
202
opacity = lerpDouble (
203
203
opacityStopOpacities[i - 1 ], opacityStopOpacities[i], percentage)! ;
204
204
}
205
- return color.withValues (alpha: opacity);
205
+ return color.withValues (alpha: opacity);
206
206
}
207
207
throw Exception ('Unreachable code.' );
208
208
}
0 commit comments