animateWidgetCyberScanner method
Widget
animateWidgetCyberScanner(
{ - Color color = Colors.cyanAccent,
- int durationMs = 1500,
- bool repeat = true,
- bool animate = true,
})
Implementation
Widget animateWidgetCyberScanner(
{Color color = Colors.cyanAccent,
int durationMs = 1500,
bool repeat = true,
bool animate = true}) {
if (!animate) return this;
return _baseAnimate(repeat: repeat).custom(
duration: durationMs.ms,
builder: (_, v, c) => LayoutBuilder(
builder: (ctx, cons) => Stack(
alignment: Alignment.center,
children: [
c,
Positioned(
bottom: v * cons.maxHeight,
left: 0,
right: 0,
child: Opacity(
opacity: (1 - v).clamp(0, 1),
child: Container(
height: 3,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(color: color, blurRadius: 15, spreadRadius: 4),
BoxShadow(
color: color.withColorOpacity(0.5),
blurRadius: 30,
spreadRadius: 8),
],
),
),
),
),
],
),
),
);
}