SToggle constructor
const
SToggle({
- Key? key,
- double size = 60.0,
- Color onColor = Colors.white,
- Color offColor = Colors.black87,
- bool value = false,
- Duration? animationDuration,
- dynamic onChange(
- bool value
- double dragSensitivity = 0.85,
- double dragSmoothing = 0.1,
- bool debugShowPointers = false,
- bool animateBackground = true,
- double backgroundOpacity = 0.15,
- double borderWidth = 1.0,
- Color? borderColor,
- double littleBorderWidth = 0.0,
- Color? littleBorderColor,
- double littleShadowBlurSigma = 6.0,
- Offset littleShadowOffset = const Offset(0, 2),
- Color littleShadowColor = const Color(0x40000000),
Implementation
const SToggle({
super.key,
this.size = 60.0,
this.onColor = Colors.white,
this.offColor = Colors.black87,
this.value = false,
this.animationDuration,
this.onChange,
this.dragSensitivity = 0.85,
this.dragSmoothing = 0.1,
this.debugShowPointers = false,
this.animateBackground = true,
this.backgroundOpacity = 0.15,
this.borderWidth = 1.0,
this.borderColor,
this.littleBorderWidth = 0.0,
this.littleBorderColor,
this.littleShadowBlurSigma = 6.0,
this.littleShadowOffset = const Offset(0, 2),
this.littleShadowColor = const Color(0x40000000),
}) : _width = size,
_height = size / 2;