lerp method Null safety

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

Linearly interpolate between two elevated button themes.

Implementation

static ElevatedButtonThemeData? lerp(ElevatedButtonThemeData? a, ElevatedButtonThemeData? b, double t) {
  assert (t != null);
  if (a == null && b == null) {
    return null;
  }
  return ElevatedButtonThemeData(
    style: ButtonStyle.lerp(a?.style, b?.style, t),
  );
}