processTapDown method

void processTapDown()

Handles the tap down event for the button.

This method is called when the user presses down on the button. It can be used to trigger visual feedback or other actions.

Implementation

void processTapDown() {
  HapticFeedback.selectionClick();
  if (widget.toggle) {
    if (_animationController.status == AnimationStatus.completed) {
    } else {
      _animationController.forward();
    }
  } else {
    _animationController.forward();
  }
}