animate method
Returns a AnimatedStyle from this Style with the provided duration and curve.
Implementation
AnimatedStyle animate({Duration? duration, Curve? curve}) {
return AnimatedStyle._(
styles: styles,
variants: variants,
animated: AnimatedData(duration: duration, curve: curve),
);
}