lerp static method

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

Linearly interpolate between two action icon themes.

Implementation

static ActionIconThemeData? lerp(ActionIconThemeData? a, ActionIconThemeData? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  return ActionIconThemeData(
    backButtonIconBuilder: t < 0.5 ? a?.backButtonIconBuilder : b?.backButtonIconBuilder,
    closeButtonIconBuilder: t < 0.5 ? a?.closeButtonIconBuilder : b?.closeButtonIconBuilder,
    drawerButtonIconBuilder: t < 0.5 ? a?.drawerButtonIconBuilder : b?.drawerButtonIconBuilder,
    endDrawerButtonIconBuilder: t < 0.5 ? a?.endDrawerButtonIconBuilder : b?.endDrawerButtonIconBuilder,
  );
}