INNER CODE UNIT · Dart

radius

e200/my-flutter-challenges · air_defense_system/lib/widget.dart:293

    final radius = min(size.width / 2, size.height / 2);

    final radialPaint = Paint()
      ..shader = SweepGradient(
        center: Alignment.center,
        startAngle: 0,
        endAngle: pi * 2,
        colors: const [
          Colors.black,
          Color(0xFF255C25),
          Color(0xFF0ef30f),
        ],
        stops: [
          0,
          1 - (radarRange / 100),
          1,
        ],
      ).createShader(Rect.fromCircle(center: center, radius: radius));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…