Lightning constructor

const Lightning({
  1. Key? key,
  2. required double maxValue,
  3. required Widget child,
  4. Duration? delayDuration = const Duration(milliseconds: 500),
  5. bool useGesture = false,
  6. double borderRadius = 0,
  7. bool repeat = false,
  8. LightningController? controller,
  9. Duration pauseRepeatDelay = const Duration(seconds: 2),
  10. Color overlayColor = const Color.fromRGBO(255, 255, 255, 0.1),
  11. Duration pauseDuration = const Duration(milliseconds: 200),
  12. Duration durationIn = const Duration(milliseconds: 300),
  13. Duration durationOut = const Duration(milliseconds: 600),
  14. Curve curveIn = Curves.easeIn,
  15. Curve curveOut = Curves.linear,
  16. 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});