intermediateCallback static method

int intermediateCallback(
  1. Pointer<Void> handle,
  2. Pointer<Char> text
)

Implementation

static int intermediateCallback(
  ffi.Pointer<ffi.Void> handle,
  ffi.Pointer<ffi.Char> text,
) {
  int refClassId = handle.address;
  if (!callbacks.containsKey(refClassId)){
    return 0;
  }
  Function(String) callback = callbacks[refClassId]!;
  callback(text.cast<Utf8>().toDartString());
  return 0; // 1で中断
}