create method

  1. @override
Pointer<logger_t> create()
override

The implementing stub should implement this function. It should create and initialize the ffi struct that will be used as the handle for the foreign code to invoke the dart code.

Implementation

@override
ffi.Pointer<generated.logger_t> create() {
  ffi.Pointer<generated.logger_t> handle = calloc<generated.logger_t>();
  handle.ref.context = handle.address;
  handle.ref.log = ffi.Pointer.fromFunction(_log);
  return handle;
}