onOff method

Widget onOff({
  1. String activeText = 'On',
  2. String inactiveText = 'Off',
  3. bool disabled = false,
  4. bool showOnOff = true,
  5. required bool value,
  6. required void onToggle(
    1. 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,
      ),
    );