master #81
@ -42,4 +42,14 @@ class MultiColor {
|
|||||||
|
|
||||||
bool get isGradient =>
|
bool get isGradient =>
|
||||||
(_colors?.isNotEmpty ?? false) && (_colors?.length ?? 0) > 1;
|
(_colors?.isNotEmpty ?? false) && (_colors?.length ?? 0) > 1;
|
||||||
|
|
||||||
|
static MultiColor? lerp(MultiColor? a, MultiColor? b, double t) {
|
||||||
|
if (a == null && b == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (b == null) {
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user