buttonStyleAnimationDuration top-level property

Duration buttonStyleAnimationDuration
getter/setter pair

ButtonStyle.animationDuration for every style built in this file.

Material's ButtonStyleButton wraps each button in an AnimatedTheme (icon color) and its Material in an AnimatedDefaultTextStyle (foreground), both driven by this duration. Any change to a resolved color restarts those tweens — hover and press, but also every inherited MonetTheme publish while the app theme animates. At Material's default (kThemeChangeDuration, 200 ms) that is a ThemeData.lerp over ~50 sub-themes per frame per button for the whole transition plus 200 ms.

MonetTheme already animates colors, so the inner tween only adds cost. Duration.zero makes the AnimationController complete synchronously (no ticker; the Tween short-circuits to end at t=1, so no lerp): state changes snap, as libmonet button backgrounds always have — Material never tweens its color, only elevation, shadow and shape.

Mutable so a perf harness can A/B old and new in one run; production leaves the default.

Implementation

Duration buttonStyleAnimationDuration = Duration.zero;