subtractClamping method

int subtractClamping(
  1. int subtract, {
  2. int minValue = 0,
  3. int maxValue = 999999999,
})

Implementation

int subtractClamping(
  int subtract, {
  int minValue = 0,
  int maxValue = 999999999,
}) {
  return (this - subtract).clamp(
    minValue,
    maxValue,
  );
}