implement js_interop withUint32Callback

This commit is contained in:
Nick Fisher committed 2025-05-18 15:11:52 +08:00
1 parent c53266f12f
commit 871a327d99
1 file changed
+2 -4
@@ -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;
} }