lerp static method

Linearly interpolate between two FolderViewTextThemes

Implementation

static FolderViewTextTheme lerp(
  FolderViewTextTheme? a,
  FolderViewTextTheme? b,
  double t,
) {
  if (a == null && b == null) {
    return const FolderViewTextTheme();
  }
  if (a == null) return b!;
  if (b == null) return a;

  return FolderViewTextTheme(
    textStyle: TextStyle.lerp(a.textStyle, b.textStyle, t),
    selectedTextStyle:
        TextStyle.lerp(a.selectedTextStyle, b.selectedTextStyle, t),
    folderTextStyle: TextStyle.lerp(a.folderTextStyle, b.folderTextStyle, t),
    parentTextStyle: TextStyle.lerp(a.parentTextStyle, b.parentTextStyle, t),
    childTextStyle: TextStyle.lerp(a.childTextStyle, b.childTextStyle, t),
  );
}