T extends Function> static method
Convert Dart function to a C function pointer, automatically marshalling the arguments and return value
If an exception is thrown while calling
f(), the native function will
exceptionalReturn, which must be assignable to return type of
The returned function address can only be invoked on the mutator (main) thread of the current isolate. It will abort the process if invoked on any other thread. Use NativeCallable.listener to create callbacks that can be invoked from any thread.
The pointer returned will remain alive for the duration of the current isolate's lifetime. After the isolate it was created in is terminated, invoking it from native code will cause undefined behavior.
Does not accept dynamic invocations -- where the type of the receiver is
external static Pointer<NativeFunction<T>> fromFunction<T extends Function>(
@DartRepresentationOf('T') Function f,