brightnessAdjustMatrix static method

List<double> brightnessAdjustMatrix({
  1. double? value,
})

Implementation

static List<double> brightnessAdjustMatrix({double? value}) {
  if (value! <= 0)
  value = value * 255;
  else value = value * 100;

  if (value == 0)
  return [
  1,0,0,0,0,
  0,1,0,0,0,
  0,0,1,0,0,
  0,0,0,1,0,
  ];

  return List<double>.from(<double>[
  1, 0, 0, 0, value, 0, 1, 0, 0, value, 0, 0, 1, 0, value, 0, 0, 0, 1, 0
  ]).map((i) => i.toDouble()).toList();
  }