alignSwitch method

void alignSwitch()

Aligns the switch to its designated position.

This method is responsible for adjusting the alignment of the switch within its parent container or layout. It ensures that the switch is positioned correctly based on the current layout constraints and alignment settings.

Usage:

alignSwitch();

Implementation

void alignSwitch() {
  if (_animationController.value > 0.5) {
    switchTo(true);
  } else {
    switchTo(false);
  }
}