invert constant

ColorFilter const invert

A color filter that inverts the colors of the content.

This filter applies a color matrix that negates all three color channels and inverts the alpha channel, effectively inverting the colors of the content.

Implementation

static const ColorFilter invert = ColorFilter.matrix(<double>[
  -1, 0, 0, 0, 255, //
  0, -1, 0, 0, 255, //
  0, 0, -1, 0, 255, //
  0, 0, 0, 1, 0, //
]);