EditHandle constructor

EditHandle({
  1. Key? key,
  2. required LatLng point,
  3. required double size,
  4. IconData? icon,
  5. Color color = Colors.white,
  6. Color borderColor = const Color(0xFFE0E0E0),
  7. double borderWidth = 1.0,
  8. Color? iconColor,
  9. List<BoxShadow>? shadows,
  10. Color? activeColor,
  11. Color? activeBorderColor,
  12. double? activeBorderWidth,
  13. double touchSizeFactor = 1.5,
  14. BoxShape shape = BoxShape.circle,
})

Implementation

EditHandle({
  super.key,
  required super.point,
  required double size,
  IconData? icon,
  Color color = Colors.white,
  Color borderColor = const Color(0xFFE0E0E0),
  double borderWidth = 1.0,
  Color? iconColor,
  List<BoxShadow>? shadows,
  // Active state params
  Color? activeColor,
  Color? activeBorderColor,
  double? activeBorderWidth,
  double touchSizeFactor = 1.5,
  BoxShape shape = BoxShape.circle,
}) : super(
        width: size,
        height: size,
        alignment: Alignment.center,
        rotate: false,
        // Normal State
        child: _HandleWidget(
          size: size,
          color: color,
          borderColor: borderColor,
          borderWidth: borderWidth,
          shape: shape,
          icon: icon,
          iconColor: iconColor ?? Colors.black54,
          shadows: shadows,
        ),
        options: [
          ActiveMarkerOptions(
            touchSizeFactor: touchSizeFactor,
            // Active State
            active: _HandleWidget(
              size: size,
              color: activeColor ?? color,
              borderColor: activeBorderColor ?? Colors.blueAccent,
              borderWidth: activeBorderWidth ?? 2.0,
              shape: shape,
              icon: icon,
              iconColor: iconColor ??
                  Colors.white, // Invert icon for active if needed
              shadows: [
                BoxShadow(
                  color: (activeBorderColor ?? Colors.blueAccent)
                      .withValues(alpha: 0.4),
                  blurRadius: 10,
                  spreadRadius: 2,
                )
              ],
              scale: 1.2, // Subtle scale up
            ),
          ),
        ],
      );