animateExposureBlink method

Widget animateExposureBlink({
  1. bool animate = true,
})
  1. Exposure Blink

Implementation

Widget animateExposureBlink({bool animate = true}) {
  if (!animate) return this;
  return this
      .animate(onPlay: (controller) => controller.repeat(reverse: true))
      .custom(
        duration: 800.ms,
        builder:
            (_, v, c) => ColorFiltered(
              colorFilter: ColorFilter.matrix([
                1 + v,
                0,
                0,
                0,
                0,
                0,
                1 + v,
                0,
                0,
                0,
                0,
                0,
                1 + v,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
              ]),
              child: c,
            ),
      );
}