toggle method

Widget toggle({
  1. IconData? activeIcon,
  2. IconData? inactiveIcon,
  3. String? activeText,
  4. String? inactiveText,
  5. bool disabled = false,
  6. bool showOnOff = false,
  7. required bool value,
  8. required void onToggle(
    1. bool
    ),
})

Implementation

Widget toggle({
  IconData? activeIcon,
  IconData? inactiveIcon,
  String? activeText,
  String? inactiveText,
  bool disabled = false,
  bool showOnOff = false,
  required bool value,
  required void Function(bool) onToggle,
}) =>
    Padding(
      padding: lazy.padAll(margin),
      child: FlutterSwitch(
        activeColor: Theme.of(context).colorScheme.background,
        activeIcon: _themedIcon(activeIcon),
        activeText: activeText,
        borderRadius: borderRadius,
        disabled: disabled,
        duration: Duration(milliseconds: durationMilliseconds),
        height: height,
        inactiveColor: Theme.of(context).colorScheme.background,
        inactiveIcon: _themedIcon(inactiveIcon),
        inactiveText: inactiveText,
        onToggle: onToggle,
        padding: padding,
        showOnOff: showOnOff,
        toggleSize: toggleSize,
        value: value,
        width: width,
      ),
    );