Small helper (avoids importing dart:ui explicitly everywhere).
double lerpDouble(double a, double b, double t) => a + (b - a) * t;