handleUpdate method
Intercepts AnimationTickMsg and dispatches it to the matching controller via AnimationController.processTick.
If the message is an AnimationTickMsg whose controllerId matches
one of the registered controllers, the tick is processed and the
resulting Cmd (which schedules the next tick, or null if done)
is returned.
For all other messages, delegates to super.handleUpdate.
Implementation
@override
Cmd? handleUpdate(Msg msg) {
if (msg is AnimationTickMsg) {
for (final controller in _controllers) {
if (controller.id == msg.controllerId) {
// processTick calls notifyListeners internally, which triggers
// any setState callbacks the user registered — so the widget
// is already marked dirty by the time we return.
return controller.processTick(msg.time);
}
}
}
return super.handleUpdate(msg);
}