SwitchCipper constructor

const SwitchCipper({
  1. Key? key,
  2. required Widget child,
  3. required Widget background,
  4. Duration duration = const Duration(milliseconds: 500),
  5. Curve curve = Curves.bounceOut,
  6. Curve reverseCurve = Curves.ease,
  7. bool? isSelect,
  8. bool? onSelect(
    1. bool result
    )?,
  9. AlignmentGeometry alignment = Alignment.center,
  10. SwitchCipperBuilder? customCipperBuilder,
  11. bool initSelect = false,
  12. OnAnimationStatusChanged? onAnimationComplate,
  13. double? value,
  14. bool hasAnimationWhenValueChanged = true,
  15. bool enableWhenAnimating = true,
})

Implementation

const SwitchCipper({
  Key? key,
  required this.child,
  required this.background,
  this.duration = const Duration(milliseconds: 500),
  this.curve = Curves.bounceOut,
  this.reverseCurve = Curves.ease,
  this.isSelect,
  this.onSelect,
  this.alignment = Alignment.center,
  this.customCipperBuilder,
  this.initSelect = false,
  this.onAnimationComplate,
  this.value,
  this.hasAnimationWhenValueChanged = true,
  this.enableWhenAnimating = true,
}) : super(key: key);