animateWidgetColorReveal method
Widget
animateWidgetColorReveal(
{ - int durationMs = 800,
- bool repeat = false,
- bool animate = true,
})
- 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),
);
}