AnimatedSwitch constructor
const
AnimatedSwitch({
- Key? key,
- bool value = false,
- String? textOff,
- String? textOn,
- Color colorOn = Colors.green,
- Color colorOff = Colors.red,
- Color indicatorColor = Colors.white,
- IconData? iconOff,
- IconData? iconOn,
- Duration animationDuration = const Duration(milliseconds: 300),
- double? width,
- double? height,
- TextStyle? textStyle,
- Function? onTap,
- Function? onDoubleTap,
- Function? onSwipe,
- dynamic onChanged(
- 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);