Switchy constructor
const
Switchy({
- Key? key,
- required bool value,
- required ValueChanged<
bool> onChanged, - required dynamic activeIcon,
- required dynamic inactiveIcon,
- double iconSize = 20,
- List<
Color> activeColors = const [Color(0xFF27AE60), Color(0xFF2ECC71)], - List<
Color> inactiveColors = const [Color(0xFF95A5A6), Color(0xFF7F8C8D)], - Duration duration = const Duration(milliseconds: 400),
- double height = 36,
- double width = 70,
- double circlePadding = 6,
- double circleMargin = 6,
- double circleSizeRatio = 0.7,
Implementation
const Switchy({
super.key,
required this.value,
required this.onChanged,
required this.activeIcon,
required this.inactiveIcon,
this.iconSize = 20,
this.activeColors = const [Color(0xFF27AE60), Color(0xFF2ECC71)],
this.inactiveColors = const [Color(0xFF95A5A6), Color(0xFF7F8C8D)],
this.duration = const Duration(milliseconds: 400),
this.height = 36,
this.width = 70,
this.circlePadding = 6,
this.circleMargin = 6,
this.circleSizeRatio = 0.7,
});