onOff method
Widget
onOff(
{ - String activeText = 'On',
- String inactiveText = 'Off',
- bool disabled = false,
- bool showOnOff = true,
- required bool value,
- required void onToggle(
- bool
),
})
Implementation
Widget onOff({
String activeText = 'On',
String inactiveText = 'Off',
bool disabled = false,
bool showOnOff = true,
required bool value,
required void Function(bool) onToggle,
}) =>
Padding(
padding: lazy.padAll(margin),
child: FlutterSwitch(
activeColor: Theme.of(context).colorScheme.background,
activeText: activeText,
borderRadius: borderRadius,
disabled: disabled,
duration: Duration(milliseconds: durationMilliseconds),
height: height,
inactiveColor: Theme.of(context).colorScheme.background,
inactiveText: inactiveText,
onToggle: onToggle,
padding: padding,
showOnOff: showOnOff,
value: value,
width: width,
toggleSize: toggleSize,
),
);