adjustHue method Null safety

void adjustHue(
  1. num value
)

Implementation

void adjustHue(num value) {
  final v = min(max(value, -1), 1) * pi;
  final cv = cos(v);
  final sv = sin(v);

  _concat([
    _lumaR - cv * _lumaR - sv * _lumaR + cv,
    _lumaG - cv * _lumaG - sv * _lumaG,
    _lumaB - cv * _lumaB - sv * _lumaB + sv,
    0,
    _lumaR - cv * _lumaR + sv * 0.143,
    _lumaG - cv * _lumaG + sv * 0.140 + cv,
    _lumaB - cv * _lumaB - sv * 0.283,
    0,
    _lumaR - cv * _lumaR + sv * _lumaR - sv,
    _lumaG - cv * _lumaG + sv * _lumaG,
    _lumaB - cv * _lumaB + sv * _lumaB + cv,
    0,
    0,
    0,
    0,
    1
  ], [
    0,
    0,
    0,
    0
  ]);
}