lerpValue static method

Implementation

static WidgetModifierSpec? lerpValue(
  WidgetModifierSpec? begin,
  WidgetModifierSpec? end,
  double t,
) {
  if (begin != null && end != null) {
    assert(
      begin.runtimeType == end.runtimeType,
      'You can only lerp the same type of ModifierSpec',
    );

    return begin.lerp(end, t) as WidgetModifierSpec?;
  }

  return begin ?? end;
}