sidewidth method

double sidewidth(
  1. Size size
)

Implementation

double sidewidth(Size size) {
  var p1 = 0.2;
  var p2 = 0.8;

  if (revealPercent <= p1) {
    return enableSideReveal ? 15.0 : 0;
  }

  if (revealPercent >= p2) {
    return size.width;
  }

  return 15 + (size.width - 15.0) * (revealPercent - p1) / (p2 - p1);
}