nativeFunction property

Pointer<NativeFunction<C>> get nativeFunction

Returns the native function pointer for this callback.

Initializes the NativeCallable on first access. Asserts that the callback has not been disposed.

Implementation

Pointer<NativeFunction<C>> get nativeFunction {
  if (!_initialized) {
    _initialized = true;
    _callable = initializer();
  }
  assert(!_isDisposed, '$runtimeType: has been disposed');
  return _callable.nativeFunction;
}