shadeValue function Null safety

int shadeValue(
  1. int value,
  2. double factor
)

Implementation

int shadeValue(int value, double factor) =>
    max(0, min(value - (value * factor).round(), 255));