static ffi.Pointer<ffi.Void> toPointer(Circle? val) { if (val == null) { return ffi.nullptr; } final result = malloc.call<CircleNative>(); result.ref = toNative(val); return result.cast(); }