bindViewModelInstance method

  1. @mustCallSuper
void bindViewModelInstance(
  1. ViewModelInstance viewModelInstance
)

Binds the provided viewModelInstance to the state machine

Docs: https://rive.app/docs/runtimes/data-binding

Implementation

@mustCallSuper
void bindViewModelInstance(ViewModelInstance viewModelInstance) {
  _boundRuntimeViewModelInstance
      ?.removeAdvanceRequestListener(requestAdvance);
  _boundRuntimeViewModelInstance = viewModelInstance;
  viewModelInstance.addAdvanceRequestListener(requestAdvance);
}