animateRadarScan method
Widget
animateRadarScan(
{ - Color color = Colors.blueAccent,
- bool animate = true,
})
Implementation
Widget animateRadarScan(
{Color color = Colors.blueAccent, bool animate = true}) {
if (!animate) return this;
return this.animate(onPlay: (controller) => controller.repeat()).custom(
duration: 2000.ms,
builder: (context, value, child) => Stack(
alignment: Alignment.center,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: color.withValues(alpha: (1 - value).clamp(0, 1)),
width: value * 20,
),
),
width: value * 200,
height: value * 200,
),
child,
],
),
);
}