master #81

Closed
malo wants to merge 322 commits from master into feat/bloc_layout/new-package
Showing only changes of commit 25224469b5 - Show all commits

View File

@ -64,12 +64,15 @@ class MultiColor {
); );
} else if (a.isGradient && b.isGradient) { } else if (a.isGradient && b.isGradient) {
final colors = List<Color>.empty(growable: true); final colors = List<Color>.empty(growable: true);
for (int i = 0; i < a.colors.length; i++) { final shortestList =
(a.colors.length > b.colors.length) ? b.colors : a.colors;
for (int i = 0; i < shortestList.length; i++) {
final lerpColor = Color.lerp(a.colors[i], b.colors[i], t); final lerpColor = Color.lerp(a.colors[i], b.colors[i], t);
if (lerpColor != null) { if (lerpColor != null) {
colors.add(lerpColor); colors.add(lerpColor);
} }
} }
return MultiColor(colors);
} }
return b; return b;
} }