animateWidgetColorReveal method

Widget animateWidgetColorReveal({
  1. int durationMs = 800,
  2. bool repeat = false,
  3. bool animate = true,
})
  1. Color Reveal (B&W to Color)

Implementation

Widget animateWidgetColorReveal({
  int durationMs = 800,
  bool repeat = false,
  bool animate = true,
}) {
  if (!animate) return this;
  return _baseAnimate(repeat: repeat).custom(
    duration: durationMs.ms,
    builder:
        (_, v, child) => ColorFiltered(
          colorFilter: ColorFilter.matrix([
            v,
            0,
            0,
            0,
            0,
            0,
            v,
            0,
            0,
            0,
            0,
            0,
            v,
            0,
            0,
            0,
            0,
            0,
            1,
            0,
          ]),
          child: child,
        ),
  );
}