onEvent method

void onEvent(
  1. void callback(
    1. MediaEvent
    )?
)

Implementation

void onEvent(void Function(MediaEvent)? callback) {
  if (callback == null) {
    _eventCb.clear();
    Libfvp.unregisterType(nativeHandle, 0);
  } else {
    _eventCb.add(callback);
    Libfvp.registerType(nativeHandle, 0, false);
  }
}