Lightning constructor
const
Lightning({
- Key? key,
- required double maxValue,
- required Widget child,
- Duration? delayDuration = const Duration(milliseconds: 500),
- bool useGesture = false,
- double borderRadius = 0,
- bool repeat = false,
- LightningController? controller,
- Duration pauseRepeatDelay = 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,
Implementation
const Lightning(
{super.key,
required this.maxValue,
required this.child,
this.delayDuration = const Duration(milliseconds: 500),
this.useGesture = false,
this.borderRadius = 0,
this.repeat = false,
this.controller,
this.pauseRepeatDelay = 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});