forward method
Animates from the current value to the specified target value.
This method starts a forward animation from the current value to the
specified to value, applying the given curve for easing.
Parameters
to- The target value to animate to (typically between 0.0 and 1.0).curve- Optional easing curve. Defaults toCurves.linearif not specified.
Returns
A TickerFuture that completes when the animation finishes.
Example
// Animate to 1.0 with ease-out curve
await animation.forward(1.0, Curves.easeOut);
Implementation
TickerFuture forward(double to, [Curve? curve]) {
_from = value;
_to = to;
_curve = curve ?? Curves.linear;
return _controller.forward(from: 0);
}