onAnimationStatusChanged property

ValueChanged<AnimationStatus>? onAnimationStatusChanged
final

An optional callback that is invoked when the AnimationStatus of the menu changes during open and close animations.

If animated is false, this callback will only be invoked with AnimationStatus.completed when the menu is opened, and AnimationStatus.dismissed when the menu is closed.

Because the MenuController.isOpen property is true while the menu is opening, opened, and closing, it cannot be used to determine whether the menu is in the process of closing or opening. As such, this callback provides a way to determine when the menu is opening or closing.

Defaults to null.

Implementation

final ValueChanged<AnimationStatus>? onAnimationStatusChanged;