apply method

double apply({
  1. double max = 1.0,
  2. double min = 0.0,
})

Implementation

double apply({double max = 1.0, double min = 0.0}) {
  final x = use;
  if (x < min) {
    return min;
  } else if (x > max) {
    return max;
  } else {
    return x;
  }
}