lerp method Null safety

ProgressIndicatorThemeData? lerp(
  1. ProgressIndicatorThemeData? a,
  2. ProgressIndicatorThemeData? b,
  3. double t
)

Linearly interpolate between two progress indicator themes.

If both arguments are null, then null is returned.

Implementation

static ProgressIndicatorThemeData? lerp(ProgressIndicatorThemeData? a, ProgressIndicatorThemeData? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  assert(t != null);
  return ProgressIndicatorThemeData(
    color: Color.lerp(a?.color, b?.color, t),
    linearTrackColor : Color.lerp(a?.linearTrackColor, b?.linearTrackColor, t),
    linearMinHeight : lerpDouble(a?.linearMinHeight, b?.linearMinHeight, t),
    circularTrackColor : Color.lerp(a?.circularTrackColor, b?.circularTrackColor, t),
    refreshBackgroundColor : Color.lerp(a?.refreshBackgroundColor, b?.refreshBackgroundColor, t),
  );
}