toggle method

void toggle()

Toggle the drawer. If the drawer is open, close it. If the drawer is closed, open it. Using animationController value to animate and toggle the drawer.

Implementation

void toggle() => animationController.isDismissed
    ? animationController.forward()
    : animationController.reverse();