animateWidgetRadarScan method

Widget animateWidgetRadarScan({
  1. Color color = Colors.blueAccent,
  2. int durationMs = 2000,
  3. bool repeat = true,
  4. bool animate = true,
})
  1. Radar Scan (Radar Loop)

Implementation

Widget animateWidgetRadarScan({
  Color color = 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, child) => Stack(
          alignment: Alignment.center,
          children: [
            Container(
              decoration: BoxDecoration(
                shape: BoxShape.circle,
                border: Border.all(
                  color: color.withColorOpacity(1 - v),
                  width: v * 20,
                ),
              ),
              width: v * 200,
              height: v * 200,
            ),
            child,
          ],
        ),
  );
}