implement js_interop withUint32Callback

This commit is contained in:
Nick Fisher
2025-05-15 16:53:35 +08:00
parent c53266f12f
commit 871a327d99

View File

@@ -375,11 +375,9 @@ Future<int> withUInt32Callback(
void Function(int) callback = (int result) { void Function(int) callback = (int result) {
completer.complete(result); completer.complete(result);
}; };
// final nativeCallable = final ptr = callback.addFunction();
// NativeCallable<Void Function(Uint32)>.listener(callback); func.call(ptr.cast());
// func.call(nativeCallable.nativeFunction);
await completer.future; await completer.future;
// nativeCallable.close();
return completer.future; return completer.future;
} }