lerp static method

Linearly interpolate between two themes.

The arguments must not be null.

Implementation

static SfRangeSliderThemeData? lerp(
    SfRangeSliderThemeData? a, SfRangeSliderThemeData? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  return SfRangeSliderThemeData(
      activeTrackHeight:
          lerpDouble(a!.activeTrackHeight, b!.activeTrackHeight, t),
      inactiveTrackHeight:
          lerpDouble(a.inactiveTrackHeight, b.inactiveTrackHeight, t),
      tickSize: Size.lerp(a.tickSize, b.tickSize, t),
      minorTickSize: Size.lerp(a.minorTickSize, b.minorTickSize, t),
      tickOffset: Offset.lerp(a.tickOffset, b.tickOffset, t),
      labelOffset: Offset.lerp(a.labelOffset, b.labelOffset, t),
      inactiveLabelStyle:
          TextStyle.lerp(a.inactiveLabelStyle, b.inactiveLabelStyle, t),
      activeLabelStyle:
          TextStyle.lerp(a.activeLabelStyle, b.activeLabelStyle, t),
      tooltipTextStyle:
          TextStyle.lerp(a.tooltipTextStyle, b.tooltipTextStyle, t),
      inactiveTrackColor:
          Color.lerp(a.inactiveTrackColor, b.inactiveTrackColor, t),
      activeTrackColor: Color.lerp(a.activeTrackColor, b.activeTrackColor, t),
      thumbColor: Color.lerp(a.thumbColor, b.thumbColor, t),
      thumbStrokeColor: Color.lerp(a.thumbStrokeColor, b.thumbStrokeColor, t),
      overlappingThumbStrokeColor: Color.lerp(
          a.overlappingThumbStrokeColor, b.overlappingThumbStrokeColor, t),
      activeDividerStrokeColor: Color.lerp(
          a.activeDividerStrokeColor, b.activeDividerStrokeColor, t),
      inactiveDividerStrokeColor: Color.lerp(
          a.inactiveDividerStrokeColor, b.inactiveDividerStrokeColor, t),
      activeTickColor: Color.lerp(a.activeTickColor, b.activeTickColor, t),
      inactiveTickColor:
          Color.lerp(a.inactiveTickColor, b.inactiveTickColor, t),
      disabledActiveTickColor:
          Color.lerp(a.disabledActiveTickColor, b.disabledActiveTickColor, t),
      disabledInactiveTickColor: Color.lerp(
          a.disabledInactiveTickColor, b.disabledInactiveTickColor, t),
      activeMinorTickColor:
          Color.lerp(a.activeMinorTickColor, b.activeMinorTickColor, t),
      inactiveMinorTickColor:
          Color.lerp(a.inactiveMinorTickColor, b.inactiveMinorTickColor, t),
      disabledActiveMinorTickColor: Color.lerp(
          a.disabledActiveMinorTickColor, b.disabledActiveMinorTickColor, t),
      disabledInactiveMinorTickColor: Color.lerp(
          a.disabledInactiveMinorTickColor,
          b.disabledInactiveMinorTickColor,
          t),
      overlayColor: Color.lerp(a.overlayColor, b.overlayColor, t),
      inactiveDividerColor:
          Color.lerp(a.inactiveDividerColor, b.inactiveDividerColor, t),
      activeDividerColor:
          Color.lerp(a.activeDividerColor, b.activeDividerColor, t),
      disabledActiveTrackColor: Color.lerp(
          a.disabledActiveTrackColor, b.disabledActiveTrackColor, t),
      disabledInactiveTrackColor: Color.lerp(
          a.disabledInactiveTrackColor, b.disabledInactiveTrackColor, t),
      disabledActiveDividerColor: Color.lerp(
          a.disabledActiveDividerColor, b.disabledActiveDividerColor, t),
      disabledInactiveDividerColor: Color.lerp(
          a.disabledInactiveDividerColor, b.disabledInactiveDividerColor, t),
      disabledThumbColor:
          Color.lerp(a.disabledThumbColor, b.disabledThumbColor, t),
      tooltipBackgroundColor:
          Color.lerp(a.tooltipBackgroundColor, b.tooltipBackgroundColor, t),
      overlappingTooltipStrokeColor: Color.lerp(
          // ignore: lines_longer_than_80_chars
          a.overlappingTooltipStrokeColor,
          b.overlappingTooltipStrokeColor,
          t),
      // ignore: lines_longer_than_80_chars
      trackCornerRadius:
          lerpDouble(a.trackCornerRadius, b.trackCornerRadius, t),
      overlayRadius: lerpDouble(a.overlayRadius, b.overlayRadius, t),
      thumbRadius: lerpDouble(a.thumbRadius, b.thumbRadius, t),
      // ignore: lines_longer_than_80_chars
      activeDividerRadius:
          lerpDouble(a.activeDividerRadius, b.activeDividerRadius, t),
      // ignore: lines_longer_than_80_chars
      inactiveDividerRadius: lerpDouble(a.inactiveDividerRadius, b.inactiveDividerRadius, t),
      thumbStrokeWidth: lerpDouble(a.thumbStrokeWidth, b.thumbStrokeWidth, t),
      // ignore: lines_longer_than_80_chars
      activeDividerStrokeWidth: lerpDouble(a.activeDividerStrokeWidth, b.activeDividerStrokeWidth, t),
      // ignore: lines_longer_than_80_chars
      inactiveDividerStrokeWidth: lerpDouble(a.inactiveDividerStrokeWidth, b.inactiveDividerStrokeWidth, t));
}