toggle method

Widget toggle(
  1. bool isSelected,
  2. dynamic onChange(
    1. bool
    ),
  3. BuildContext context
)

Implementation

Widget toggle(
    bool isSelected, Function(bool) onChange, BuildContext context) {
  return StyledSwitch(
    onChange: onChange,
    enabled: isSelected,
  );
}