animateListInvertReveal method
Widget
animateListInvertReveal(
{ - required int index,
- int intervalMs = 50,
- int durationMs = 500,
- bool animate = true,
})
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,
),
);
}