animateRange static method

double animateRange(
  1. double value, {
  2. double start = 0.0,
  3. double end = 1.0,
})

Implementation

static double animateRange(double value, {double start = 0.0, double end = 1.0}){
  assert(start != null && start >= 0 && start <= 1.0);
  assert(end != null && end >= 0 && end <= 1.0);
  assert(value != null && value >= 0 && value <= 1.0);

  //The ratio of the animate over first
  //that will be the percintile for the animate over
  double ratioOfFirst = start/end;

  return animateOver(
    animateOverFirst(value, percent: end),
    percent: ratioOfFirst
  );
}