setAnimateToHandler method
void
setAnimateToHandler(
- void handler(
- GraphViewport target, {
- Curve curve,
- Duration duration,
- Object? token,
Sets the handler for viewport animations.
This handler is invoked by the animate* methods to trigger smooth viewport animations via the ViewportAnimationMixin in NodeFlowEditor.
The token parameter is used to identify which widget set the handler,
preventing race conditions when widgets are recreated (where the old
widget's dispose could clear the new widget's handler).
Called by NodeFlowEditor during initialization.
Implementation
void setAnimateToHandler(
void Function(GraphViewport target, {Duration duration, Curve curve})?
handler, {
Object? token,
}) {
_onAnimateToViewport = handler;
_animateToHandlerToken = token;
}