animateWidgetDigitalGlitch method
Widget
animateWidgetDigitalGlitch(
{ - int durationMs = 200,
- bool repeat = true,
- bool animate = true,
})
Implementation
Widget animateWidgetDigitalGlitch(
{int durationMs = 200, bool repeat = true, bool animate = true}) {
if (!animate) return this;
return _baseAnimate(repeat: repeat, reverse: true)
.custom(
duration: durationMs.ms,
builder: (_, v, c) => Transform.translate(
offset: Offset(v * 2, -v * 1),
child: Opacity(opacity: 0.9 + (v * 0.1), child: c),
),
)
.then(delay: 2000.ms);
}