Skip to content

Commit

Permalink
Fixed core mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wilkerson-Barker authored and nielsenko committed Jan 29, 2024
1 parent 2637b72 commit 0d6ff75
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions lib/src/native/realm_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2347,17 +2347,16 @@ class _RealmCore {

Future<void> updateBaseUrl(App app, Uri baseUrl) {
final completer = Completer<void>();
String url = baseUrl.toString();
using((arena) {
_realmLib.invokeGetBool(
() => _realmLib.realm_app_update_base_url(
app.handle._pointer,
url.toCharPtr(arena),
Pointer.fromFunction(void_completion_callback),
completer.toPersistentHandle(),
_realmLib.addresses.realm_dart_delete_persistent_handle,
),
"Update base URL failed");
_realmLib.invokeGetBool(
() => _realmLib.realm_app_update_base_url(
app.handle._pointer,
baseUrl.toString().toCharPtr(arena),
_realmLib.addresses.realm_dart_void_completion_callback,
_createAsyncCallbackUserdata(completer),
_realmLib.addresses.realm_dart_userdata_async_free,
),
"Update base URL failed");
});
return completer.future;
}
Expand Down

0 comments on commit 0d6ff75

Please sign in to comment.