void intCompleter(Completer<int> completer, VoidPtr p) { final value = p.cast<ffi.Int>().value; calloc.free(p); completer.complete(value); }