postNclEvent method

void postNclEvent(
  1. Map<String, dynamic> event
)

Implementation

void postNclEvent(Map<String, dynamic> event) {
  for (final refId in List<int>.from(_registeredCallbackRefs)) {
    _lua.rawGetI(luaRegistryIndex, refId);
    if (_lua.isFunction(-1)) {
      _pushMapAsTable(_lua, event);
      try {
        _lua.pCall(1, 0, 0);
      } catch (e) {
        // ignore
      }
    } else {
      _lua.pop(1);
    }
  }
}