lerp static method
Implementation
static NavigationPaneThemeData lerp(
NavigationPaneThemeData? a,
NavigationPaneThemeData? b,
double t,
) {
return NavigationPaneThemeData(
iconPadding: EdgeInsetsGeometry.lerp(a?.iconPadding, b?.iconPadding, t),
labelPadding:
EdgeInsetsGeometry.lerp(a?.labelPadding, b?.labelPadding, t),
headerPadding:
EdgeInsetsGeometry.lerp(a?.headerPadding, b?.headerPadding, t),
tileColor: ButtonState.lerp(a?.tileColor, b?.tileColor, t, Color.lerp),
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
overlayBackgroundColor:
Color.lerp(a?.overlayBackgroundColor, b?.overlayBackgroundColor, t),
itemHeaderTextStyle:
TextStyle.lerp(a?.itemHeaderTextStyle, b?.itemHeaderTextStyle, t),
selectedTextStyle: ButtonState.lerp(
a?.selectedTextStyle, b?.selectedTextStyle, t, TextStyle.lerp),
unselectedTextStyle: ButtonState.lerp(
a?.unselectedTextStyle, b?.unselectedTextStyle, t, TextStyle.lerp),
selectedTopTextStyle: ButtonState.lerp(
a?.selectedTextStyle, b?.selectedTextStyle, t, TextStyle.lerp),
unselectedTopTextStyle: ButtonState.lerp(
a?.unselectedTextStyle, b?.unselectedTextStyle, t, TextStyle.lerp),
highlightColor: Color.lerp(a?.highlightColor, b?.highlightColor, t),
animationCurve: t < 0.5 ? a?.animationCurve : b?.animationCurve,
animationDuration: lerpDuration(a?.animationDuration ?? Duration.zero,
b?.animationDuration ?? Duration.zero, t),
selectedIconColor: ButtonState.lerp(
a?.selectedIconColor, b?.selectedIconColor, t, Color.lerp),
unselectedIconColor: ButtonState.lerp(
a?.unselectedIconColor, b?.unselectedIconColor, t, Color.lerp),
paneNavigationButtonIcon:
t < 0.5 ? a?.paneNavigationButtonIcon : b?.paneNavigationButtonIcon,
);
}