AnimatedSwitch constructor

const AnimatedSwitch({
  1. Key? key,
  2. bool value = false,
  3. String? textOff,
  4. String? textOn,
  5. Color colorOn = Colors.green,
  6. Color colorOff = Colors.red,
  7. Color indicatorColor = Colors.white,
  8. IconData? iconOff,
  9. IconData? iconOn,
  10. Duration animationDuration = const Duration(milliseconds: 300),
  11. double? width,
  12. double? height,
  13. TextStyle? textStyle,
  14. Function? onTap,
  15. Function? onDoubleTap,
  16. Function? onSwipe,
  17. dynamic onChanged(
    1. bool value
    )?,
})

Implementation

const AnimatedSwitch(
    {Key? key,
    this.value = false,
    this.textOff,
    this.textOn,
    this.colorOn = Colors.green,
    this.colorOff = Colors.red,
    this.indicatorColor = Colors.white,
    this.iconOff,
    this.iconOn,
    this.animationDuration = const Duration(milliseconds: 300),
    this.width,
    this.height,
    this.textStyle,
    this.onTap,
    this.onDoubleTap,
    this.onSwipe,
    this.onChanged})
    : super(key: key);