gray method

Widget gray({
  1. bool enable = true,
})

Implementation

Widget gray({bool enable = true}) {
  //colorFilter: enable ? const ColorFilter.matrix(<double>[])
  if (!enable) {
    return this;
  }
  return ColorFiltered(
    colorFilter: const ColorFilter.matrix(<double>[
      0.2126,
      0.7152,
      0.0722,
      0,
      0,
      0.2126,
      0.7152,
      0.0722,
      0,
      0,
      0.2126,
      0.7152,
      0.0722,
      0,
      0,
      0,
      0,
      0,
      1,
      0,
    ]),
    child: this,
  );
}