lerp static method
- BadgeThemeData? a,
- BadgeThemeData? b,
- double t
Linearly interpolate between two Badge themes.
Implementation
static BadgeThemeData lerp(BadgeThemeData? a, BadgeThemeData? b, double t) {
if (identical(a, b) && a != null) {
return a;
}
return BadgeThemeData(
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
textColor: Color.lerp(a?.textColor, b?.textColor, t),
smallSize: lerpDouble(a?.smallSize, b?.smallSize, t),
largeSize: lerpDouble(a?.largeSize, b?.largeSize, t),
textStyle: TextStyle.lerp(a?.textStyle, b?.textStyle, t),
padding: EdgeInsetsGeometry.lerp(a?.padding, b?.padding, t),
alignment: AlignmentGeometry.lerp(a?.alignment, b?.alignment, t),
offset: Offset.lerp(a?.offset, b?.offset, t),
);
}