Lightning constructor
const
Lightning({
- Key? key,
- required Widget child,
- Duration? delayDuration = const Duration(milliseconds: 500),
- bool useGesture = false,
- double borderRadius = 0,
- bool repeatInfinity = false,
- LightningController? controller,
- Duration pauseRepeatInfinityDelay = const Duration(seconds: 2),
- Color overlayColor = const Color.fromRGBO(255, 255, 255, 0.1),
- Duration pauseDuration = const Duration(milliseconds: 200),
- Duration durationIn = const Duration(milliseconds: 300),
- Duration durationOut = const Duration(milliseconds: 600),
- Curve curveIn = Curves.easeIn,
- Curve curveOut = Curves.linear,
- LightningDirection direction = LightningDirection.leftToRight,
- bool autoStart = true,
Creates a Lightning widget.
The child parameter is required and represents the widget that will
have the lightning effect applied to it.
Implementation
const Lightning(
{super.key,
required this.child,
this.delayDuration = const Duration(milliseconds: 500),
this.useGesture = false,
this.borderRadius = 0,
this.repeatInfinity = false,
this.controller,
this.pauseRepeatInfinityDelay = const Duration(seconds: 2),
this.overlayColor = const Color.fromRGBO(255, 255, 255, 0.1),
this.pauseDuration = const Duration(milliseconds: 200),
this.durationIn = const Duration(milliseconds: 300),
this.durationOut = const Duration(milliseconds: 600),
this.curveIn = Curves.easeIn,
this.curveOut = Curves.linear,
this.direction = LightningDirection.leftToRight,
this.autoStart = true});