animateListInvertReveal method

Widget animateListInvertReveal({
  1. required int index,
  2. int intervalMs = 50,
  3. int durationMs = 500,
  4. bool animate = true,
})
  1. Ghost Invert

Implementation

Widget animateListInvertReveal(
    {required int index,
    int intervalMs = 50,
    int durationMs = 500,
    bool animate = true}) {
  if (!animate) return this;
  return this.animate(delay: _getDelay(index, intervalMs).ms).fadeIn().custom(
        begin: 1.0,
        end: 0.0,
        duration: durationMs.ms,
        builder: (_, v, c) => ColorFiltered(
          colorFilter: ColorFilter.matrix([
            -1 * v + (1 - v),
            0,
            0,
            0,
            255 * v,
            0,
            -1 * v + (1 - v),
            0,
            0,
            255 * v,
            0,
            0,
            -1 * v + (1 - v),
            0,
            255 * v,
            0,
            0,
            0,
            1,
            0,
          ]),
          child: c,
        ),
      );
}