switchTo method

void switchTo(
  1. bool value
)

Implementation

void switchTo(bool value) {
  if (value) {
    _animationController.forward();
    if (widget.onChanged != null) {
      widget.onChanged!(true);
    }
  } else {
    _animationController.reverse();
    if (widget.onChanged != null) {
      widget.onChanged!(false);
    }
  }
  HapticFeedback.selectionClick();
}