lerp static method

Linearly interpolate between two dart code viewer themes.

The arguments must not be null.

Implementation

static DartCodeViewerThemeData lerp(
  DartCodeViewerThemeData a,
  DartCodeViewerThemeData b,
  double t,
) {
  return DartCodeViewerThemeData(
    baseStyle: TextStyle.lerp(a.baseStyle, b.baseStyle, t),
    classStyle: TextStyle.lerp(a.classStyle, b.classStyle, t),
    commentStyle: TextStyle.lerp(a.commentStyle, b.commentStyle, t),
    constantStyle: TextStyle.lerp(a.constantStyle, b.constantStyle, t),
    keywordStyle: TextStyle.lerp(a.keywordStyle, b.keywordStyle, t),
    numberStyle: TextStyle.lerp(a.numberStyle, b.numberStyle, t),
    punctuationStyle: TextStyle.lerp(
      a.punctuationStyle,
      b.punctuationStyle,
      t,
    ),
    stringStyle: TextStyle.lerp(a.stringStyle, b.stringStyle, t),
    backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
    height: lerpDouble(a.height, b.height, t),
    width: lerpDouble(a.width, b.width, t),
  );
}