getAnimationDuration method

Duration getAnimationDuration(
  1. MaterialButton button
)

The duration of the button's highlight animation.

Returns the button's MaterialButton.animationDuration it if is non-null, otherwise 200ms.

Implementation

Duration getAnimationDuration(MaterialButton button) {
  return button.animationDuration ?? kThemeChangeDuration;
}