animate method

DVModifier animate(
  1. Duration duration, {
  2. Curve curve = Curves.easeOut,
})

Animates changes to this box's decoration and geometry over duration.

A card whose border takes the accent on hover snaps without this, which reads as a glitch rather than a response. Honours the reader's reduced-motion setting: when that is on the box simply takes its new appearance, because an animation the reader asked not to see is not a nicety to keep.

Implementation

DVModifier animate(
  Duration duration, {
  Curve curve = Curves.easeOut,
}) =>
    _copyWith(animateDuration: duration, animateCurve: curve);