ui_kit-ui_components/feat/add-textinputs-components #145

Merged
hugo merged 25 commits from ui_kit-ui_components/feat/add-textinputs-components into master 2023-02-21 15:11:35 +00:00
Showing only changes of commit 25224469b5 - Show all commits

View File

@ -64,12 +64,15 @@ class MultiColor {
);
} else if (a.isGradient && b.isGradient) {
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);
if (lerpColor != null) {
colors.add(lerpColor);
}
}
return MultiColor(colors);
}
return b;
}