PaintDecorator.grayscale constructor

PaintDecorator.grayscale({
  1. double opacity = 1.0,
})

Implementation

PaintDecorator.grayscale({double opacity = 1.0}) {
  _paint.color = Color.fromARGB((255 * opacity).toInt(), 0, 0, 0);
  _paint.blendMode = BlendMode.luminosity;
}