Implementation
static ZeroThemeData lerp(ZeroThemeData a, ZeroThemeData b, double t) {
return ZeroThemeData.raw(
brightness: t < 0.5 ? a.brightness : b.brightness,
fontFamily: t < 0.5 ? a.fontFamily : b.fontFamily,
useMaterial3: t < 0.5 ? a.useMaterial3 : b.useMaterial3,
primaryColor: AccentColor.lerp(a.primaryColor, b.primaryColor, t),
typography: ZeroTypography.lerp(a.typography, b.typography, t),
disabledColor: Color.lerp(a.disabledColor, b.disabledColor, t)!,
scaffoldBackgroundColor:
Color.lerp(a.scaffoldBackgroundColor, b.scaffoldBackgroundColor, t)!,
uncheckedColor: Color.lerp(a.uncheckedColor, b.uncheckedColor, t)!,
checkedColor: Color.lerp(a.checkedColor, b.checkedColor, t)!,
cardColor: Color.lerp(a.cardColor, b.cardColor, t)!,
colorScheme: ColorScheme.lerp(a.colorScheme, b.colorScheme, t),
iconTheme: IconThemeData.lerp(a.iconTheme, b.iconTheme, t),
dialogTheme: DialogTheme.lerp(a.dialogTheme, b.dialogTheme, t),
expansionTileStyle: ZeroExpansionTileStyle.lerp(
a.expansionTileStyle, b.expansionTileStyle, t)!,
disabledBackgroundColor:
Color.lerp(a.disabledBackgroundColor, b.disabledBackgroundColor, t)!,
successColor: Color.lerp(a.successColor, b.successColor, t)!,
infoColor: Color.lerp(a.infoColor, b.infoColor, t)!,
warningColor: Color.lerp(a.warningColor, b.warningColor, t)!,
errorColor: Color.lerp(a.errorColor, b.errorColor, t)!,
dividerColor: Color.lerp(a.dividerColor, b.dividerColor, t)!,
solidTextColor: Color.lerp(a.solidTextColor, b.solidTextColor, t)!,
regularTextColor: Color.lerp(a.regularTextColor, b.regularTextColor, t)!,
listTileStyle:
ZeroListTileStyle.lerp(a.listTileStyle, b.listTileStyle, t),
primaryButtonStyle:
ZeroButtonStyle.lerp(a.primaryButtonStyle, b.primaryButtonStyle, t),
secondaryButtonStyle: ZeroButtonStyle.lerp(
a.secondaryButtonStyle, b.secondaryButtonStyle, t),
textButtonStyle:
ZeroButtonStyle.lerp(a.textButtonStyle, b.textButtonStyle, t),
dividerStyle: ZeroDividerStyle.lerp(a.dividerStyle, b.dividerStyle, t),
chipFilledStyle:
ZeroChipFilledStyle.lerp(a.chipFilledStyle, b.chipFilledStyle, t),
chipOutlinedStyle: ZeroChipOutlinedStyle.lerp(
a.chipOutlinedStyle, b.chipOutlinedStyle, t),
navigationBarStyle: ZeroNavigationBarStyle.lerp(
a.navigationBarStyle, b.navigationBarStyle, t),
navigationDrawerStyle: ZeroNavigationDrawerStyle.lerp(
a.navigationDrawerStyle, b.navigationDrawerStyle, t),
appBarStyle: ZeroAppBarStyle.lerp(a.appBarStyle, b.appBarStyle, t),
cardStyle: ZeroCardStyle.lerp(a.cardStyle, b.cardStyle, t),
buttonIconStyle:
ZeroButtonIconStyleSet.lerp(a.buttonIconStyle, b.buttonIconStyle, t),
navigationRailStyle: ZeroNavigationRailStyle.lerp(
a.navigationRailStyle, b.navigationRailStyle, t),
switchStyle: ZeroSwitchStyleSet.lerp(a.switchStyle, b.switchStyle, t),
tabBarStyle: ZeroTabBarStyle.lerp(a.tabBarStyle, b.tabBarStyle, t),
menuStyle: ZeroMenuStyle.lerp(a.menuStyle, b.menuStyle, t)!,
speedDialStyle:
ZeroSpeedDialStyle.lerp(a.speedDialStyle, b.speedDialStyle, t),
textfieldStyleSet: ZeroTextfieldStyleSet.lerp(
a.textfieldStyleSet, b.textfieldStyleSet, t),
checkboxStyle:
ZeroCheckboxStyle.lerp(a.checkboxStyle, b.checkboxStyle, t),
radioStyle: ZeroRadioStyle.lerp(a.radioStyle, b.radioStyle, t),
progressStyle:
ZeroProgressStyle.lerp(a.progressStyle, b.progressStyle, t),
ratingStyle: ZeroRatingStyle.lerp(a.ratingStyle, b.ratingStyle, t),
sliderStyle: ZeroSliderStyle.lerp(a.sliderStyle, b.sliderStyle, t),
avatarStyle: ZeroAvatarStyle.lerp(a.avatarStyle, b.avatarStyle, t),
buttonTheme: t < 0.5 ? a.buttonTheme : b.buttonTheme,
buttonGroupStyle: ZeroButtonGroupStyleSet.lerp(
a.buttonGroupStyle, b.buttonGroupStyle, t),
stepStyle: ZeroStepStyle.lerp(a.stepStyle, b.stepStyle, t),
stepperStyle: ZeroStepperStyle.lerp(a.stepperStyle, b.stepperStyle, t),
tooltipStyle: ZeroTooltipStyle.lerp(a.tooltipStyle, b.tooltipStyle, t),
alertDialogStyle:
ZeroAlertDialogStyle.lerp(a.alertDialogStyle, b.alertDialogStyle, t),
skeletonStyle:
ZeroSkeletonStyleSet.lerp(a.skeletonStyle, b.skeletonStyle, t),
snackBarStyle:
ZeroSnackbarStyleSet.lerp(a.snackBarStyle, b.snackBarStyle, t),
timePickerStyle:
ZeroTimePickerStyle.lerp(a.timePickerStyle, b.timePickerStyle, t),
bottomSheetStyle:
ZeroBottomSheetStyle.lerp(a.bottomSheetStyle, b.bottomSheetStyle, t),
datePickerStyle:
ZeroDatePickerStyle.lerp(a.datePickerStyle, b.datePickerStyle, t),
);
}