FThemeData.lerp constructor
FThemeData.lerp(
- FThemeData a,
- FThemeData b,
- double t
Creates a linear interpolation between two FThemeData using the given factor t
.
Implementation
factory FThemeData.lerp(FThemeData a, FThemeData b, double t) => FThemeData(
debugLabel: t < 0.5 ? a.debugLabel : b.debugLabel,
breakpoints: t < 0.5 ? a.breakpoints : b.breakpoints,
colors: FColors.lerp(a.colors, b.colors, t),
typography: FTypography.lerp(a.typography, b.typography, t),
style: a.style.lerp(b.style, t),
accordionStyle: a.accordionStyle.lerp(b.accordionStyle, t),
autocompleteStyle: a.autocompleteStyle.lerp(b.autocompleteStyle, t),
alertStyles: a.alertStyles.lerp(b.alertStyles, t),
avatarStyle: a.avatarStyle.lerp(b.avatarStyle, t),
badgeStyles: a.badgeStyles.lerp(b.badgeStyles, t),
bottomNavigationBarStyle: a.bottomNavigationBarStyle.lerp(b.bottomNavigationBarStyle, t),
breadcrumbStyle: a.breadcrumbStyle.lerp(b.breadcrumbStyle, t),
buttonStyles: a.buttonStyles.lerp(b.buttonStyles, t),
calendarStyle: a.calendarStyle.lerp(b.calendarStyle, t),
cardStyle: a.cardStyle.lerp(b.cardStyle, t),
checkboxStyle: a.checkboxStyle.lerp(b.checkboxStyle, t),
circularProgressStyle: a.circularProgressStyle.lerp(b.circularProgressStyle, t),
dateFieldStyle: a.dateFieldStyle.lerp(b.dateFieldStyle, t),
determinateProgressStyle: a.determinateProgressStyle.lerp(b.determinateProgressStyle, t),
dialogRouteStyle: a.dialogRouteStyle.lerp(b.dialogRouteStyle, t),
dialogStyle: a.dialogStyle.lerp(b.dialogStyle, t),
dividerStyles: a.dividerStyles.lerp(b.dividerStyles, t),
headerStyles: a.headerStyles.lerp(b.headerStyles, t),
itemStyle: a.itemStyle.lerp(b.itemStyle, t),
itemGroupStyle: a.itemGroupStyle.lerp(b.itemGroupStyle, t),
labelStyles: a.labelStyles.lerp(b.labelStyles, t),
lineCalendarStyle: a.lineCalendarStyle.lerp(b.lineCalendarStyle, t),
multiSelectStyle: a.multiSelectStyle.lerp(b.multiSelectStyle, t),
modalSheetStyle: a.modalSheetStyle.lerp(b.modalSheetStyle, t),
paginationStyle: a.paginationStyle.lerp(b.paginationStyle, t),
persistentSheetStyle: a.persistentSheetStyle.lerp(b.persistentSheetStyle, t),
pickerStyle: a.pickerStyle.lerp(b.pickerStyle, t),
popoverStyle: a.popoverStyle.lerp(b.popoverStyle, t),
popoverMenuStyle: a.popoverMenuStyle.lerp(b.popoverMenuStyle, t),
progressStyle: a.progressStyle.lerp(b.progressStyle, t),
radioStyle: a.radioStyle.lerp(b.radioStyle, t),
resizableStyle: a.resizableStyle.lerp(b.resizableStyle, t),
scaffoldStyle: a.scaffoldStyle.lerp(b.scaffoldStyle, t),
selectStyle: a.selectStyle.lerp(b.selectStyle, t),
selectGroupStyle: a.selectGroupStyle.lerp(b.selectGroupStyle, t),
selectMenuTileStyle: a.selectMenuTileStyle.lerp(b.selectMenuTileStyle, t),
sidebarStyle: a.sidebarStyle.lerp(b.sidebarStyle, t),
sliderStyles: a.sliderStyles.lerp(b.sliderStyles, t),
toasterStyle: a.toasterStyle.lerp(b.toasterStyle, t),
switchStyle: a.switchStyle.lerp(b.switchStyle, t),
tabsStyle: a.tabsStyle.lerp(b.tabsStyle, t),
tappableStyle: a.tappableStyle.lerp(b.tappableStyle, t),
textFieldStyle: a.textFieldStyle.lerp(b.textFieldStyle, t),
tileStyle: a.tileStyle.lerp(b.tileStyle, t),
tileGroupStyle: a.tileGroupStyle.lerp(b.tileGroupStyle, t),
timeFieldStyle: a.timeFieldStyle.lerp(b.timeFieldStyle, t),
timePickerStyle: a.timePickerStyle.lerp(b.timePickerStyle, t),
tooltipStyle: a.tooltipStyle.lerp(b.tooltipStyle, t),
// Copied from Flutter's [ThemeData].
extensions: (a._extensions.map(
(id, extensionA) => MapEntry(id, extensionA.lerp(b._extensions[id], t)),
)..addEntries(b._extensions.entries.where((entry) => !a._extensions.containsKey(entry.key)))).values,
);