handleCallbacks method

  1. @override
void handleCallbacks()
override

Processes all callbacks for properties with attached listeners.

Listeners can be attached to a ViewModelInstanceObservableValue property using the addListener method.

This method should be invoked once per advance of the underlying state machine and artboard where the view model instance is bound.

Typically, this method is called automatically within certain painters/widgets and should not be manually invoked in most cases. However, if you are constructing your own render loop or overriding the default behavior, ensure this is called to trigger the view model properties' listeners.

To simulate certain test scenarios, you may also want to manually invoke this method in testing environments.

Implementation

@override
void handleCallbacks() {
  for (var property in _propertiesWithCallbacks) {
    property.handleListeners();
  }
}