lerp static method

Implementation

static FluentThemeData lerp(FluentThemeData a, FluentThemeData b, double t) {
  return FluentThemeData.raw(
    brightness: t < 0.5 ? a.brightness : b.brightness,
    extensions: t < 0.5 ? a.extensions : b.extensions,
    visualDensity: t < 0.5 ? a.visualDensity : b.visualDensity,
    resources: ResourceDictionary.lerp(a.resources, b.resources, t),
    accentColor: AccentColor.lerp(a.accentColor, b.accentColor, t),
    typography: Typography.lerp(a.typography, b.typography, t),
    activeColor: Color.lerp(a.activeColor, b.activeColor, t)!,
    inactiveColor: Color.lerp(a.inactiveColor, b.inactiveColor, t)!,
    inactiveBackgroundColor:
        Color.lerp(a.inactiveBackgroundColor, b.inactiveBackgroundColor, t)!,
    scaffoldBackgroundColor:
        Color.lerp(a.scaffoldBackgroundColor, b.scaffoldBackgroundColor, t)!,
    acrylicBackgroundColor:
        Color.lerp(a.acrylicBackgroundColor, b.acrylicBackgroundColor, t)!,
    micaBackgroundColor:
        Color.lerp(a.micaBackgroundColor, b.micaBackgroundColor, t)!,
    shadowColor: Color.lerp(a.shadowColor, b.shadowColor, t)!,
    cardColor: Color.lerp(a.cardColor, b.cardColor, t)!,
    fasterAnimationDuration:
        lerpDuration(a.fasterAnimationDuration, b.fasterAnimationDuration, t),
    fastAnimationDuration:
        lerpDuration(a.fastAnimationDuration, b.fastAnimationDuration, t),
    mediumAnimationDuration:
        lerpDuration(a.mediumAnimationDuration, b.mediumAnimationDuration, t),
    slowAnimationDuration:
        lerpDuration(a.slowAnimationDuration, b.slowAnimationDuration, t),
    animationCurve: t < 0.5 ? a.animationCurve : b.animationCurve,
    buttonTheme: ButtonThemeData.lerp(a.buttonTheme, b.buttonTheme, t),
    checkboxTheme:
        CheckboxThemeData.lerp(a.checkboxTheme, b.checkboxTheme, t),
    toggleSwitchTheme: ToggleSwitchThemeData.lerp(
        a.toggleSwitchTheme, b.toggleSwitchTheme, t),
    iconTheme: IconThemeData.lerp(a.iconTheme, b.iconTheme, t),
    dialogTheme: ContentDialogThemeData.lerp(a.dialogTheme, b.dialogTheme, t),
    tooltipTheme: TooltipThemeData.lerp(a.tooltipTheme, b.tooltipTheme, t),
    dividerTheme: DividerThemeData.lerp(a.dividerTheme, b.dividerTheme, t),
    navigationPaneTheme: NavigationPaneThemeData.lerp(
        a.navigationPaneTheme, b.navigationPaneTheme, t),
    radioButtonTheme:
        RadioButtonThemeData.lerp(a.radioButtonTheme, b.radioButtonTheme, t),
    toggleButtonTheme: ToggleButtonThemeData.lerp(
        a.toggleButtonTheme, b.toggleButtonTheme, t),
    sliderTheme: SliderThemeData.lerp(a.sliderTheme, b.sliderTheme, t),
    infoBarTheme: InfoBarThemeData.lerp(a.infoBarTheme, b.infoBarTheme, t),
    focusTheme: FocusThemeData.lerp(a.focusTheme, b.focusTheme, t),
    scrollbarTheme:
        ScrollbarThemeData.lerp(a.scrollbarTheme, b.scrollbarTheme, t),
    bottomNavigationTheme: BottomNavigationThemeData.lerp(
        a.bottomNavigationTheme, b.bottomNavigationTheme, t),
    menuColor: Color.lerp(a.menuColor, b.menuColor, t)!,
    selectionColor: Color.lerp(a.selectionColor, b.selectionColor, t)!,
  );
}