FontWeight lerp(FontWeight begin, FontWeight end, double t)

Linearly interpolates between two font weights.

Rather than using fractional weights, the interpolation rounds to the nearest weight.

Source

static FontWeight lerp(FontWeight begin, FontWeight end, double t) {
  return values[lerpDouble(begin?.index ?? normal.index, end?.index ?? normal.index, t.clamp(0.0, 1.0)).round()];
}