lerp static method

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

Linearly interpolates between two segmented button themes.

Implementation

static SegmentedButtonThemeData lerp(SegmentedButtonThemeData? a, SegmentedButtonThemeData? b, double t) {
  if (identical(a, b) && a != null) {
    return a;
  }
  return SegmentedButtonThemeData(
    style: ButtonStyle.lerp(a?.style, b?.style, t),
    selectedIcon: t < 0.5 ? a?.selectedIcon : b?.selectedIcon,
  );
}