lerp<T> static method

WidgetStateProperty<T?>? lerp<T>(
  1. WidgetStateProperty<T>? a,
  2. WidgetStateProperty<T>? b,
  3. double t,
  4. T? lerpFunction(
    1. T?,
    2. T?,
    3. double
    )
)

Linearly interpolate between two WidgetStatePropertys.

Implementation

static WidgetStateProperty<T?>? lerp<T>(
  WidgetStateProperty<T>? a,
  WidgetStateProperty<T>? b,
  double t,
  T? Function(T?, T?, double) lerpFunction,
) {
  // Avoid creating a _LerpProperties object for a common case.
  if (a == null && b == null) {
    return null;
  }
  return _LerpProperties<T>(a, b, t, lerpFunction);
}