apply method

int apply({
  1. int max = 100,
  2. int min = 0,
})

Implementation

int apply({int max = 100, int min = 0}) {
  final x = use;
  if (x < min) {
    return min;
  } else if (x > max) {
    return max;
  } else {
    return x;
  }
}