const
SmoothToggle(- {bool value = false,
- String textRight = 'Off',
- String textLeft = 'On',
- double textSize = 14.0,
- dynamic colorRight = Colors.red,
- dynamic colorLeft = Colors.green,
- required dynamic iconRight,
- required dynamic iconLeft,
- Duration animationDuration = const Duration(milliseconds: 320),
- dynamic onTap,
- dynamic onDoubleTap,
- dynamic onSwipe,
- required dynamic onChanged(
- bool
),
- double width = 150.0,
- double height = 50.0}
)
Implementation
const SmoothToggle({
this.value = false,
this.textRight = 'Off',
this.textLeft = 'On',
this.textSize = 14.0,
this.colorRight = Colors.red,
this.colorLeft = Colors.green,
required this.iconRight,
required this.iconLeft,
this.animationDuration = const Duration(milliseconds: 320),
this.onTap,
this.onDoubleTap,
this.onSwipe,
required this.onChanged,
this.width = 150.0,
this.height = 50.0,
});