animateWidgetScannerBeam method
Widget
animateWidgetScannerBeam(
{ - Color beamColor = Colors.blueAccent,
- int durationMs = 2000,
- bool repeat = true,
- bool animate = true,
})
Implementation
Widget animateWidgetScannerBeam({
Color beamColor = Colors.blueAccent,
int durationMs = 2000,
bool repeat = true,
bool animate = true,
}) {
if (!animate) return this;
return _baseAnimate(repeat: repeat).custom(
duration: durationMs.ms,
builder:
(_, v, c) => Stack(
children: [
c,
Positioned(
top: v * 100,
left: 0,
right: 0,
child: Container(
height: 2,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: beamColor,
blurRadius: 10,
spreadRadius: 2,
),
],
),
),
),
],
),
);
}