NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2508 most downloaded on pub.dev
Hosts the common code shared between realm, realm_dart and realm_generator packages. This package is part of the official Realm Flutter and Realm Dart SDKs.
Last release 11 months ago
23 Oct 2025
Release timing varies
gaps range from 8 days to 5 months
Nearly every release is documented
notes for 45 of 45 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
52 releases · first in 2022
One column per quarter.
Adds support for Android 16 KB page size. (Issue #1801
20.1.1 (2025-05-12) Compatibility Realm Studio: 15.0.0 or later. Internal Using Core x.y.z.
Ignore coverage in generated files. (Issue #1826 )
For the Android platform, changed compileSdkVersion into 31 from 28 to fix the fatal android:attr/lStar not found error when using Flutter 3.24.
android:attr/lStar not found error when using Flutter 3.24.PseudoType after Flutter 3.27.1. (Issue #1813)Removed all functionality related to App Services/Atlas Device Sync.
Ignore coverage in generated files. (Issue #1826 )
For the Android platform, changed compileSdkVersion into 31 from 28 to fix the fatal android:attr/lStar not found error when using Flutter 3.24.
android:attr/lStar not found error when using Flutter 3.24.PseudoType after Flutter 3.27.1. (Issue #1813)Fixed ejson dependency to 0.4.0.
AppConfiguration.maxConnectionTimeout never had any effect and has been deprecated in favor of SyncTimeoutOptions.connectTimeout . (PR #1764 )
SyncTimeoutOptions to AppConfiguration. It allows users to control sync timings, such as ping/pong intervals as well various connection timeouts. (Issue #1763)cancelAsyncOperationsOnNonFatalErrors on Configuration.flexibleSync that allows users to control whether non-fatal errors such as connection timeouts should be surfaced in the form of errors or if sync should try and reconnect in the background. (PR #1764)RealmException will be thrown that includes the offending object name, as well as more precise text for what the root cause of the error is. (PR #1748)AppConfiguration.maxConnectionTimeout never had any effect and has been deprecated in favor of SyncTimeoutOptions.connectTimeout. (PR #1764)On Windows devices Device Sync will additionally look up SSL certificates in the Windows Trusted Root Certification Authorities certificate store when
@MapTo), calling query("... SORT/DISTINCT(mapped-to-name)") with the internal name could throw an error like Cannot sort on key path 'NAME': property 'PersonObject.NAME' does not exist. (Core 14.10.4)"Next launch" metadata file actions are now performed in a multi-process safe manner. (Core 14.10.3)
realm.query<T>() method when you build the query. (Core 14.10.1)SubscriptionSet an abstract interface class, to allow mocking. (Issue #1744)List<RealmValue> that contains a link to another top level object which has been deleted by another sync client (creating a tombstone locally). In this particular case, the switch would cause any remaining link removals to recursively delete the destination object if there were no other links to it. (Core v14.10.3)List<RealmValue>, and the source table had more than 256 objects. This could manifest as array_backlink.cpp:112: Assertion failed: int64_t(value >> 1) == key.value when removing an object. (Core 14.10.3)array.cpp:319: Array::move() Assertion failed: begin <= end [2, 1] when removing an object. (Core 14.10.3)waitForUpload() was inconsistent in how it handled commits which did not produce any changesets to upload. Previously it would sometimes complete immediately if all commits waiting to be uploaded were empty, and at other times it would wait for a server roundtrip. It will now always complete immediately. (Core v14.10.3).off_t, which is a 32-bit type on 64-bit Windows. (Core 14.10.0)sane_uuid 1.0.0 was released, which has a few minor breaking change as compared to to 1.0.0-rc.5 that impact realm:
Session.getProgressStream will now return meaningful estimated values, while previously it always returned 1. (Issue #1564)sane_uuid 1.0.0 was released, which has a few minor breaking change as compared to to 1.0.0-rc.5 that impact realm:
Uuid.fromBytes factory now accepts a Uint8List instead of a ByteBufferUuid.bytes has changed to Uint8List.Issue #1729
AppConfiguration.httpClient is now of type `Client` and
To avoid dependency on dart:io
AppConfiguration.httpClient is now of type Client andAppConfiguration.baseFilePath is now of type String.Assuming you are configuring these today, migration is easy:
import 'dart:io';
import 'package:realm_dart/realm.dart';
final client = HttpClient();
final dir = Directory.current;
final config = AppConfiguration(
'your-app-id',
httpClient: client,
baseFilePath: dir,
);
becomes:
import 'dart:io';
import 'package:realm_dart/realm.dart';
import 'package:http/io_client.dart';
final client = HttpClient();
final dir = Directory.current;
final config = AppConfiguration(
'your-app-id',
httpClient: IOClient(client),
baseFilePath: dir.path,
);
(Issue #1374)
changesFor([List<String>? keyPaths]) method. Available on RealmResults, RealmList, RealmSet, and RealmMap. The key paths indicates what properties should raise a notification, if changed either directly or transitively.@RealmModel()
class _Person {
late String name;
late int age;
late List<_Person> friends;
}
// ....
// Only changes to "age" or "friends" of any of the elements of the collection, together with changes to the collection itself, will raise a notification
realm.all<Person>().changesFor(["age", "friends"]).listen( .... )
Realm.writeAsync did not handle async callbacks (Future<T> Function()) correctly. (Issue #1667)Invalid Code Signing Entitlements error. (Issue #1679)Added support for creating and storing a RealmObject using the Realm.dynamic API: realm.dynamic.create("Person", primaryKey: 123). (PR #1669)
Realm.dynamic API: realm.dynamic.create("Person", primaryKey: 123). (PR #1669)obj.dynamic.set("name", "Peter"). (PR #1669).changes on a dynamic object (obtained via the realm.dynamic API) no longer throws. (Issue #1668)Private fields did not work with default values. (Issue #1663)
Invoke scheduler callback on Zone.current. (Issue #1676)
Having links in a nested collections would leave the file inconsistent if the top object is removed. (Core 14.7.0)
Accessing App.currentUser from within a notification produced by App.switchUser() (which includes notifications for a newly logged in user) would deadlock. (Core 14.7.0)
Inserting the same typed link to the same key in a dictionary more than once would incorrectly create multiple backlinks to the object. This did not appear to cause any crashes later, but would have affecting explicit backlink count queries (eg: ...@links.@count) and possibly notifications. (Core 14.7.0)
realm_privacy bundle mistakenly included an exe-file preventing app store submissions. (Issue #1656)
Allow configuration of generator per model class. Currently support specifying the constructor style to use. ```dart const config = GeneratorConfig(ct
const config = GeneratorConfig(ctorStyle: CtorStyle.allNamed);
const realmModel = RealmModel.using(baseType: ObjectType.realmObject, generatorConfig: config);
@realmModel
class _Person {
late String name;
int age = 42;
}
will generate a constructor like:Person({
required String name,
int age = 42,
}) { ... }
(Issue #292)App.baseUrl and App.updateBaseUrl. The former is guaranteed not to be null, while the latter will now accept a null argument, in which case the base url will be restored to its default value. (Issue #1523)App.users included logged out users only if they were logged out while the App instance existed. It now always includes all logged out users. (Core 14.6.0)Assertion failed: new_size % (1ULL << m_page_shift) == 0 when opening an encrypted Realm less than 64Mb that was generated on a platform with a different page size than the current platform.DecryptionFailed exception thrown when opening a small (<4k of data) Realm generated on a device with a page size of 4k if it was bundled and opened on a device with a larger page size.encrypted_file_mapping.hpp:183: Assertion failed: local_ndx < m_page_state.size().x == 1 OR x == 2 OR x == 3) when evaluating on a string property with an empty string in the search condition. Matches with an empty string would have been evaluated as if searching for a null string instead. (Core 14.6.2)Improve file compaction performance on platforms with page sizes greater than 4k (for example arm64 Apple platforms) for files less than 256 pages in
RealmObject.changesFor([List<String>? keyPaths]) method. The key paths indicates which changes in properties should raise a notification.@RealmModel()
class _Person {
late String name;
late int age;
late List<_Person> friends;
}
// ....
// Only changes to person.age and person.friends will raise a notification
person.changesFor(["age", "friends"]).listen( .... )
Configuration.flexibleSync. This allows you to take advantage of an upcoming server-side feature that will allow schema migrations for synchronized Realms. (Issue #1599)AppConfiguration has been updated to point to services.cloud.mongodb.com. See https://www.mongodb.com/docs/atlas/app-services/domain-migration/ for more information. (Issue #1549)RealmValue.operator== when containing binary data. (PR #1628)Removed the following deprecated classes and members:
Note: Using the newly added support for collections in RealmValue with Atlas Device Sync is currently in private preview. Reach out to the support team if you need it enabled for your app. Rolling it out across all apps is expected to happen in late April 2024.
RealmValue.type is now an enum of type RealmValueType rather than Type. If you need the runtime type of the value wrapped in RealmValue, use RealmValue.value.runtimeType. (Issue #1505)
Renamed RealmValue.uint8List constructor to RealmValue.binary. (PR #1469)
Removed the following deprecated classes and members:
AppConfiguration.localAppName - was unused and had no effectAppConfiguration.localAppVersion - was unused and had no effectClientResetError.isFatal - it was always trueClientResetError.sessionErrorCodeSyncError.codeValue - can be accessed through SyncError.code.codeSyncError.category - categories were deprecated in 1.6.0SyncError.detailedMessage - was always emptySyncError constructor and SyncError.create factory - sync errors are created internally by the SDK and are not supposed to be constructed by usersSyncClientError, SyncConnectionError, SyncSessionError, SyncResolveError, SyncWebSocketError, GeneralSyncError - consolidated into SyncError as part of the error simplification in 1.6.0RealmProperty.indexed - replaced by RealmProperty.indexTypeSyncErrorCategory, SyncClientErrorCode, SyncConnectionErrorCode, SyncSessionErrorCode, SyncResolveErrorCode, SyncWebsocketErrorCode, GeneralSyncErrorCode - consolidated into SyncErrorCode as part of the error simplification in 1.6.0User.provider - the provider is associated with each identity, so the value was incorrect for users who had more than one identityThe generated parts are now named .realm.dart instead of .g.dart. This is because the builder is now a PartBuilder, instead of a SharedPartBuilder. To migrate to this version you need to update all the part declarations to match, ie. part 'x.g.dart becomes part x.realm.dart and rerun the generator.
This makes it easier to combine builders. Here is an example of combining with dart_mappable:
import 'package:dart_mappable/dart_mappable.dart';
import 'package:realm_dart/realm.dart';
part 'part_builder.realm.dart';
part 'part_builder.mapper.dart';
@MappableClass()
@RealmModel()
class $Stuff with $StuffMappable {
@MappableField()
late int id;
@override
String toString() => 'Stuff{id: $id}';
}
final realm = Realm(Configuration.local([Stuff.schema]));
void main(List<String> arguments) {
final s = realm.write(() => realm.add(Stuff(1), update: true));
print(s.toJson()); // <-- realm object as json
Realm.shutdown();
}
Removed SchemaObject.properties - instead, SchemaObject is now an iterable collection of Property. (Issue #1449)
SyncProgress.transferredBytes and SyncProgress.transferableBytes have been consolidated into SyncProgress.progressEstimate. The values reported previously were incorrect and did not accurately represent bytes either. The new field better conveys the uncertainty around the progress being reported. With this release, we're reporting accurate estimates for upload progress, but estimating downloads is still unreliable. A future server and SDK release will add better estimations for download progress. (Issue #1562)
Realm.logger is no longer settable, and no longer implements Logger from package logging. In particular you can no longer call Realm.logger.level =. Instead you should call Realm.logger.setLogLevel(RealmLogLevel level, {RealmLogCategory? category}) that takes an optional category. If no category is explicitly given, then RealmLogCategory.realm is assumed.
Also, note that setting a level is no longer local to the current isolate, but shared across all isolates. At the core level there is just one process wide logger.
Categories form a hierarchy and setting the log level of a parent category will override the level of its children. The hierarchy is exposed in a type safe manner with:
sealed class RealmLogCategory {
/// All possible log categories.
static final values = [
realm,
realm.app,
realm.sdk,
realm.storage,
realm.storage.notification,
realm.storage.object,
realm.storage.query,
realm.storage.transaction,
realm.sync,
realm.sync.client,
realm.sync.client.changeset,
realm.sync.client.network,
realm.sync.client.reset,
realm.sync.client.session,
realm.sync.server,
...
The onRecord stream now pumps RealmLogRecords that include the category the message was logged to.
If you want to hook up realm logging with conventional dart logging you can do:
Realm.logger.onRecord.forEach((r) => Logger(r.category.toString()).log(r.level.level, r.message));
If no isolate subscribes to Realm.logger.onRecord then the logs will by default be sent to stdout. (Issue #1578)
import 'package:ejson/ejson.dart';
// ...
class _Event {
late DateTime timestamp;
late String message;
}
// ...
final ejson = toEJson(aRealmObject);
final anUnmanagedRealmObject = fromEJson<Event>(ejson);
isCollectionDeleted to RealmListChanges, RealmSetChanges, and RealmMapChanges which will be true if the parent object, containing the collection has been deleted. (Core 14.0.0)isCleared to RealmMapChanges which will be true if the map has been cleared. (Core 14.0.0)class _Owner {
late List<_Dog> dogs;
}
realm.query<Owner>('dogs[1].age = 5'); // Query all owners whose second dog element is 5 years old
realm.query<Owner>('dogs[FIRST].age = 5'); // Query all owners whose first dog is 5 years old
realm.query<Owner>('dogs[LAST].age = 5'); // Query all owners whose last dog is 5 years old
realm.query<Owner>('dogs[SIZE] = 10'); // Query all owners who have 10 dogs
RealmValue property. (Issue #1504)class _Container {
late RealmValue anything;
}
realm.write(() {
realm.add(Container(anything: RealmValue.from([1, 'foo', 3.14])));
});
final container = realm.all<Container>().first;
final list = container.anything.asList(); // will throw if cast is invalid
for (final item in containerValue) {
switch (item.type) {
case RealmValueType.int:
print('Integer: ${item.value as int}');
break;
case RealmValueType.string:
print('String: ${item.value as String}');
break;
case RealmValueType.double:
print('Double: ${item.value as double}');
break;
}
}
final subscription = list.changes.listen((event) {
// The list changed
});
RealmValueType enum that contains all the possible types that can be wrapped by a RealmValue. (PR #1469)Set and Map types using the dynamic object API - obj.dynamic.getSet/getMap. (PR #1533)RealmObjectBase.objectSchema that returns the schema for this object. In most cases, this would be the schema defined in the model, but in case the Realm is opened as dynamic (by providing an empty collection for schemaObjects in the config) or using FlexibleSyncConfiguration, it may change as the schema on disk changes. (Issue #1449)Realm.schemaChanges that returns a stream of schema changes that can be listened to. Only dynamic and synchronized Realms will emit schema changes. (Issue #1449)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added User.changes stream that allows subscribers to receive notifications when the User changes - for example when the user's custom data changes or
User.changes stream that allows subscribers to receive notifications when the User changes - for example when the user's custom data changes or when their authentication state changes. (PR #1500)AppConfiguration with an empty appId will now throw an exception rather than crashing the app. (Issue #1487)Added RealmObject.getBacklinks ('sourceProperty') which is a method allowing you to look up all objects of type SourceType which link to the current o
RealmObject.getBacklinks<SourceType>('sourceProperty') which is a method allowing you to look up all objects of type SourceType which link to the current object via their sourceProperty property. (Issue #1480)App.updateBaseUrl method for updating the App's base URL for switching between cloud and edge servers. The current Sync Session(s) must be paused before calling this method and the user must log in again afterwards before the Sync Session can be resumed. (PR #1454)Reworked how creating an App instance works across isolates:
Reworked how creating an App instance works across isolates:
App(AppConfiguration) constructor should only be used on the main isolate. Ideally, it should be called once as soon as your app launches. If you attempt to use it on a background isolate (as indicated by Isolate.debugName being different from main), a warning will be logged.App.getById that allows you to obtain an already constructed app on a background isolate.
(Issue #1433)Added support for fields of type Map<String, T> where T is any supported Realm type. You can define a model with a map like:
@RealmModel()
class _LotsOfMaps {
late Map<String, _Person?> persons;
late Map<String, bool> bools;
late Map<String, DateTime> dateTimes;
late Map<String, Decimal128> decimals;
late Map<String, double> doubles;
late Map<String, int> ints;
late Map<String, ObjectId> objectIds;
late Map<String, RealmValue> realmValues;
late Map<String, String> strings;
late Map<String, Uint8List> datas;
late Map<String, Uuid> uuids;
}
The map keys may not contain . or start with $. (Issue #685)
Added a new exception - MigrationRequiredException that will be thrown when a local Realm is opened with a schema that differs from the schema on disk and no migration callback is supplied. Additionally, a helpLink property has been added to RealmException and its subclasses to provide a link to the documentation for the error. (Issue #1448)
Downgrade minimum dependencies to Dart 3.0.0 and Flutter 3.10.0. (PR #1457)
xyz.g.dart be included with part 'xyz.g.dart'; for xyz.dart files that import realm but don't have realm models defined. Those should not need generated parts and including the part file would have resulted in an empty file with // ignore_for_file: type=lint being generated. (PR #1443)RecoverOrDiscardUnsyncedChangesHandler.onBeforeReset/onAfterDiscard would not be correctly propagated and the client reset exception would contain a message like A fatal error occurred during client reset: 'User-provided callback failed' but no details about the actual error. Now SyncError has an innerError field which contains the original error thrown in the callback. (PR #1447)!m_sess assertion if the bootstrap was being applied during sync::Session activation. (Issue #7196, Core 13.25.0).App.reconnect() while it was waiting to auto-resume after a non-fatal error and then another non-fatal error was received, the sync client could crash with a !m_try_again_activation_timer assertion. (Issue #6961, Core 13.25.0)App from within a callback from the User listener (Issue #7183, Core 13.24.1)EOPNOTSUPP when using posix_fallocate() and fallback to manually consume space. This should enable android users to open a Realm on restrictive filesystems. (PR #7251, Core v13.26.0)incoming_changesets.size() != 0 when a download message is mistaken for a bootstrap message. This can happen if the synchronization session is paused and resumed at a specific time. (PR #7238, Core v13.26.0, since v11.8.0)Fixed an issue where connections to Atlas App Services would fail on Android with a certificate expiration error. (Issue #1430)
// ignore_for_file: type=lint lines being added, which itself was generating a lint warning. (Issue #1412)List that operated on indices that were not also added in the recovery, links to an object which had been deleted by another client while offline would be recreated by the recovering client. But the objects of these links would only have the primary key populated and all other fields would be default values. Now, instead of creating these zombie objects, the lists being recovered skip such deleted links. (Core 13.24.0)Simplified sync errors. The following sync errors and error codes are deprecated (#1387):
GeoPoint, GeoCircle, GeoBox and GeoPolygon. See GeoPoint documentation on how to persist locations (#1389)SyncClientError, SyncConnectionError, SyncSessionError, SyncWebSocketError, GeneralSyncError - replaced by SyncError.SyncClientErrorCode, SyncConnectionErrorCode, SyncSessionErrorCode, SyncWebSocketErrorCode, GeneralSyncErrorCode, SyncErrorCategory - replaced by SyncErrorCode.File::unlock has failed, in order to inform the SDK that we are likely hitting some limitation on the OS filesystem, instead of crashing the application and use the same file locking logic for all the platforms. (Core upgrade)SecurityContext of the default HttpClient. This ensure we work out-of-the-box on older devices (in particular Android 7 and earlier), as well as some Windows machines. (#1187, #1370)RealmResults.subscribe() and RealmResults.unsubscribe() as an easy way to create subscriptions and download data in background. Added named parameter to MutableSubscriptionSet.clear({bool unnamedOnly = false}) for removing all the unnamed subscriptions. (#1354)cancellationToken parameter to Session.waitForDownload(), Session.waitForUpload() and SubscriptionSet.waitForSynchronization(). (#1354)skip bug (#1409)App.localAppName and App.localAppVersion. They were not used by the server and were not needed to set them. (#1387)Assertion failed: ref + size <= next->first). (Core upgrade, since 13.0.0)write_not_allowed error from the server would have led to a crash. (Core 13.22.0)hashCode, which would lead to sets of RealmObjects potentially containing duplicates. (#1418)realm.subscriptions.waitForSynchronization will now correctly receive an error if a fatal session error occurs that would prevent it from ever completing. Previously the future would never resolve. (Core 13.23.3)Made binding a sync::Session exception safe so if a MultipleSyncAgents exception is thrown, the sync client can be torn down safely. (Core upgrade, since 13.4.1)
Add information about the reason a synchronization session is used for to flexible sync client BIND message. (Core upgrade)
Sync protocol version bumped to 10. (Core upgrade)
Handle badChangeset error when printing changeset contents in debug. (Core upgrade)
Using Core 13.23.4.
Support efficient skip on RealmResults
Added support for query on RealmSet.
RealmSet. (#1346)List, Set or Iterable arguments to queries with IN-operators. (#1346)Column has no fulltext index. (Core upgrade, since v13.2.0).Session.getProgressStream now returns a regular stream, instead of a broadcast stream. (#1375)SecurityContext of the default HttpClient. This ensure we work out-of-the-box on older devices (in particular Android 7 and earlier), as well as some Windows machines. (#1187, #1370)The constructors of all SyncError types are deprecated. The sync errors will be created only internally (#1291).
ClientResetError to return the backupFilePath where the backup copy of the realm will be placed once the client reset process has completed. (#1291)CompensatingWriteError containing detailed error information about the writes that have been reverted by the server due to permissions or subscription view restrictions. The Configuration.flexibleSync.syncErrorHandler will be invoked with this error type when this error occurs (#1291).SyncError types are deprecated. The sync errors will be created only internally (#1291).Backlink properties of unmanaged Realm objects will throw an error: "Using backlinks is only possible for managed objects" (#1293).Added support for Full-Text search (simple term) queries.
@Indexed(RealmIndexType.fullText) annotation.TEXT operator: realm.all<Book>().query("description TEXT \$0", "fantasy novel").DateTime field a valid primary key (#1300).It now returns true if the results collection is empty in the notification callback. This field is also marked as deprecated and will be removed in fu…
Add RealmResults.isValid (#1231).
Support Decimal128 datatype (#1192).
Realm logging is extended to support logging of all Realm storage level messages. (Core upgrade).
Realm.logger now prints by default to the console from the first Isolate that initializes a Realm in the application. (#1226).
Calling Realm.logger.clearListeners() or Realm.logger.level = RealmLogLevel.off will turn off logging. If that is the first isolate it will stop the default printing logger.
The default logger can be replaced with a custom implementation using Realm.logger = CustomLogger() from the first Isolate.
Any new spawned Isolates that work with Realm will get a new Realm.logger instance but will not print by default.
Realm.logger.level allows changing the log level per isolate.
Add logging at the Storage level (Core upgrade).
Performance improvement for the following queries (Core upgrade):
Enable multiple processes to operate on an encrypted Realm simultaneously. (Core upgrade)
Improve performance of equality queries on a non-indexed mixed property by about 30%. (Core upgrade)
Improve performance of rolling back write transactions after making changes. If no KVO observers are used this is now constant time rather than taking time proportional to the number of changes to be rolled back. Rollbacks with KVO observers are 10-20% faster. (Core upgrade)
New notifiers can now be registered in write transactions until changes have actually been made in the write transaction. This makes it so that new notifications can be registered inside change notifications triggered by beginning a write transaction (unless a previous callback performed writes). (Core upgrade)
Very slightly improve performance of runtime thread checking on the main thread on Apple platforms. (Core upgrade)
Fixed a bug that may have resulted in arrays being in different orders on different devices (Core upgrade).
Fixed a crash when querying a mixed property with a string operator (contains/like/beginswith/endswith) or with case insensitivity (Core upgrade).
Querying for equality of a string on an indexed mixed property was returning case insensitive matches. For example querying for myIndexedMixed == "Foo" would incorrectly match on values of "foo" or "FOO" etc (Core upgrade).
Adding an index to a Mixed property on a non-empty table would crash with an assertion (Core upgrade).
SyncSession.pause() could hold a reference to the database open after shutting down the sync session, preventing users from being able to delete the realm (Core upgrade).
Fixed RealmResultsChanges.isCleared which was never set. It now returns true if the results collection is empty in the notification callback. This field is also marked as deprecated and will be removed in future. Use RealmResultsChanges.results.isEmpty instead.(#1265). (#1278).
Fix a stack overflow crash when using the query parser with long chains of AND/OR conditions. (Core upgrade)
SyncManager::immediately_run_file_actions() no longer ignores the result of trying to remove a realm. This could have resulted in a client reset action being reported as successful when it actually failed on windows if the Realm was still open (Core upgrade).
Fix a data race. If one thread committed a write transaction which increased the number of live versions above the previous highest seen during the current session at the same time as another thread began a read, the reading thread could read from a no-longer-valid memory mapping (Core upgrade).
Fixed a crash or exception when doing a fulltext search for multiple keywords when the intersection of results is not equal. (Core upgrade).
Don't report non ssl related errors during ssl handshake as fatal in default socket provider. (Core upgrade)
Performing a query like "{1, 2, 3, ...} IN list" where the array is longer than 8 and all elements are smaller than some values in list, the program would crash (Core upgrade)
Performing a large number of queries without ever performing a write resulted in steadily increasing memory usage, some of which was never fully freed due to an unbounded cache (Core upgrade)
Exclusion of words in a full text search does not work (Core upgrade)
Fixed a fatal error (reported to the sync error handler) during client reset (or automatic PBS to FLX migration) if the reset has been triggered during an async open and the schema being applied has added new classes. (Core upgrade), since automatic client resets were introduced in v11.5.0)
Full text search would sometimes find words where the word only matches the beginning of the search token (Core upgrade)
We could crash when removing backlinks in cases where forward links did not have a corresponding backlink due to corruption. We now silently ignore this inconsistency in release builds, allowing the app to continue. (Core upgrade)
If you freeze a Results based on a collection of objects, the result would be invalid if you delete the collection (Core upgrade)
Deprecated SyncResolveError and SyncResolveErrorCode (#1182).
SyncResolveError and SyncResolveErrorCode (#1182).SyncWebSocketError and SyncWebSocketErrorCode for web socket connection sync errors (#1182).FlexibleSyncConfiguration.shouldCompactCallback support (#1204).RealmSet.asResults() (#1214).switchUser of the App to a user that has been logged out (#1182).RealmSet<T> when T is a realm object (#1202).Fixed the sync client being stuck in a cycle if an integration error occurs by issuing a client reset (Core upgrade).
Fix codesigning errors when publishing to the macOS App Store.
We are proud to forge this release as 1.0. The Realm Flutter and Dart SDK is now being used by thousands of developers and has proven reliable.
We are proud to forge this release as 1.0. The Realm Flutter and Dart SDK is now being used by thousands of developers and has proven reliable.
realm_dart library failed to load. (#1143)This project is in Release Candidate stage.
This project is in Release Candidate stage.
App.reconnect() providing a hint to Realm to reconnect all sync sessions.Realm.refresh() and Realm.refreshAsync() support. (#1046)isCleared on list collections and sets. (#1128)SyncSession.pause() allow users to suspend a Realm's sync session until it is explicitly resumed with SyncSession.resume(). Previously it could be implicitly resumed in rare cases. (Core upgrade)Realm.freeze() and friends (RealmObject.freeze(),RealmList.freeze(), RealmResults.freeze(), RealmSet.freeze()) by eliminating some redundant work around schema initialization and validation. (Core upgrade)A fatal error occurred during client reset: 'A previous 'Recovery' mode reset from <timestamp> did not succeed, giving up on 'Recovery' mode to prevent a cycle' error message. (Core upgrade)SyncResolveErrorCode enum's items. (#1131.This project is in Release Candidate stage.
This project is in Release Candidate stage.
writeCopy API to copy a Realm file and optionally encrypt it with a different key. (#1103)realm.deleteMany() will handle efficiently ManagedRealmList instances. (#1117)This project is in Release Candidate stage.
This project is in Release Candidate stage.
RealmException instead of RealmError. (#974)maxNumberOfActiveVersions when creating a Configuration. (#1036)shouldDeleteIfMigrationNeeded when creating a Configuration.local. (#1049)unknown error code to all SyncErrors: SyncSessionErrorCode.unknown, SyncConnectionErrorCode.unknown, SyncClientErrorCode.unknown, GeneralSyncErrorCode.unknown. Use unknown error code instead of throwing a RealmError. (#1052)RealmValue data type. This new type can represent any valid Realm data type, including objects. Lists of RealmValue are also supported, but RealmValue itself cannot contain collections. Please note that a property of type RealmValue cannot be nullable, but can contain null, represented by the value RealmValue.nullValue(). (#1051)ClientResetError.resetRealm now returns a bool to indicate if reset was initiated or not. (#1067)SyncErrorCategory.resolve, SyncResolveError and SyncResolveErrorCode for network resolution errors when sync.SyncSessionErrorCode for "Compensating write" with error code 231. (#1022)beginWriteAsync and commitAsync. (#1042)RealmException instead of blocking the isolate. (#974)Finalizable. (dart-lang/sdk#49075)This project is in Release Candidate stage.
This project is in Release Candidate stage.
FunctionsClient.call no longer accepts a null for the optional functionsArgs parameter, but it is still optional. (#1025)This project is in Release Candidate stage.
This project is in Release Candidate stage.
FlexibleSyncConfiguration is changed from manual to recoverOrDiscard. In this mode Realm attempts to recover unsynced local changes and if that fails, then the changes are discarded. (#925)path parameter to Configuration.disconnectedSync. This path is required to open the correct synced realm file. (#1007)MutableSubscriptionSet.removeByType for removing subscriptions by their realm object type. (#317)User.functions. This is the entry point for calling Atlas App functions. Functions allow you to define and execute server-side logic for your application. Atlas App functions are created on the server, written in modern JavaScript (ES6+) and executed in a serverless manner. When you call a function, you can dynamically access components of the current application as well as information about the request to execute the function and the logged in user that sent the request. (#973)RealmResult<int>. (#162)RealmList<int>.changes is supported. (#893)@Backlink(#fieldName). (#996)@Indexed attribute on all indexable type, and ensure appropriate indexes are created in the realm. (#797)parent getter on embedded objects. (#979)FlexibleSyncConfiguration. A parameter clientResetHandler is added to Configuration.flexibleSync. Supported client reset handlers are ManualRecoveryHandler, DiscardUnsyncedChangesHandler, RecoverUnsyncedChangesHandler and RecoverOrDiscardUnsyncedChangesHandler. RecoverOrDiscardUnsyncedChangesHandler is the default strategy. (#925) An example usage of the default clientResetHandler is as follows: final config = Configuration.flexibleSync(user, [Task.schema],
clientResetHandler: RecoverOrDiscardUnsyncedChangesHandler(
// The following callbacks are optional.
onBeforeReset: (beforeResetRealm) {
// Executed right before a client reset is about to happen.
// If an exception is thrown here the recovery and discard callbacks are not called.
},
onAfterRecovery: (beforeResetRealm, afterResetRealm) {
// Executed right after an automatic recovery from a client reset has completed.
},
onAfterDiscard: (beforeResetRealm, afterResetRealm) {
// Executed after an automatic recovery from a client reset has failed but the Discard has completed.
},
onManualResetFallback: (clientResetError) {
// Handle the reset manually in case some of the callbacks above throws an exception
},
)
);
AuthProviderType returned by User.provider for google, facebook and apple credentials.Configuration.disconnectedSync where changing the schema could result in migration exception. (#999)This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Transaction which is a class that exposes an API for committing and rolling back an active transaction.realm.beginWriteAsync which returns a Future<Transaction> that resolves when the write lock has been obtained.realm.writeAsync which opens an asynchronous transaction, invokes the provided callback, then commits the transaction asynchronously.Realm.open API to asynchronously open a local or synced Realm. When opening a synchronized Realm it will download all the content available at the time the operation began and then return a usable Realm. (#731)ObjectType.embedded to the @RealmModel annotation. Reassigning an embedded object is not allowed and neither is linking to it from multiple parents. Querying for embedded objects directly is also disallowed as they should be viewed as complex structures belonging to their parents as opposed to standalone objects. (Issue #662)@RealmModel()
class _Person {
late String name;
_Address? address;
}
// The generated `Address` class will be an embedded object.
@RealmModel(ObjectType.embedded)
class _Address {
late String street;
late String city;
}
User.apiKeys to return more meaningful errors when the user cannot perform API key actions - e.g. when the user has been logged in with API key credentials or when the user has been logged out. (Issue #950)dart run realm_dart generate and flutter pub run realm generate commands to exit with the correct error code on failure.Realm.add/delete/deleteMany. (PR #942)list.remove would not correctly remove the value if the value is the first element in the list. (PR #975)This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Credentials.EmailPassword or EmailPasswordAuthProvider.registerUser) to contain an extra empty byte at the end. (PR #918).
Notice: Any existing email users might need to be recreated because of this breaking change.Realm, RealmObject, RealmList, and RealmResults now have a method freeze() which returns an immutable version of the object, as well as an isFrozen property which can be used to check whether an object is frozen. (#56)T to any object o where o is T. Previously it was required that o.runtimeType == T. (#904)final config = Configuration.local([Person.schema], schemaVersion: 4, migrationCallback: (migration, oldSchemaVersion) {
if (oldSchemaVersion == 1) {
// Between v1 and v2 we removed the Bar type
migration.deleteType('Bar');
}
if (oldSchemaVersion == 2) {
// Between v2 and v3 we fixed a typo in the 'Person.name' property.
migration.renameProperty('Person', 'nmae', 'name');
}
if (oldSchemaVersion == 3) {
final oldPeople = migration.oldRealm.all('Person');
for (final oldPerson in oldPeople) {
final newPerson = migration.findInNewRealm<Person>(oldPerson);
if (newPerson == null) {
// That person must have been deleted, so nothing to do.
continue;
}
// Between v3 and v4 we're obfuscating the users' exact age by storing age group instead.
newPerson.ageGroup = calculateAgeGroup(oldPerson.dynamic.get<int>('age'));
}
}
});
RealmList<int?>. (#163)User.apiKeys client - this client can be used to create, fetch, and delete API keys.Credentials.apiKey that enable authentication with API keys.User.accessToken and User.refreshToken - these tokens can be used to authenticate against the server when calling HTTP API outside of the Dart/Flutter SDK. For example, if you want to use the GraphQL. (PR #919)encryptionKey to Configuration.local, Configuration.flexibleSync and Configuration.disconnectedSync so realm files can be encrypted and existing encrypted files from other Realm sources opened (assuming you have the key)(#920)expect(realm.all<Person>(), [alice, bob, carol, dan]); // assume this pass, then ...
expect(team.players.query('TRUEPREDICATE'), [alice, bob]); // <-- ... this fails and return the same as realm.all<Person>()
expect(realm.query<Person>('FALSEPREDICATE').query('TRUEPREDICATE'), isEmpty); //<-- Fails if a Person object exists
Configuration.initialDataCallback are now properly surfaced back to the Realm() constructor. (#698)This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Configuration.schema to Configuration.schemaObjects and changed its type to Iterable<SchemaObject>. You can now access the Realm's schema via the new Realm.schema property. #495)Realm. Those are primarily intended to be used during migrations, but are available at all times for advanced use cases. #495)Realm.schema property exposing the Realm's schema as passed through the Configuration or read from disk. #495)This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
DisconnectedSyncConfiguration for opening a synchronized realm in a disconnected state. This configuration allows a synchronized realm to be opened by a secondary process, while a primary process handles synchronization. (#621)Configuration.defaultRealmName for setting the default realm name. (#665)Configuration.defaultRealmPath for setting a custom default path for realms. (#665)Configuration.defaultStoragePath for getting the platform specific storage paths. (#665)App.deleteUser for deleting user accounts. (#679)Credentials.jwt for login user with JWT issued by custom provider . (#715)Credentials.function for login user with Custom Function Authentication Provider. (#742)update flag on Realm.add and Realm.addAll to support upserts. (#668)fruit IN {'apple', 'orange'}. This also includes general query support for list vs list matching such as NONE fruits IN {'apple', 'orange'}. (Issue #4266)Finalizable to ensure lexically scoped lifetime of finalizable resources (Realm, App, etc.). (#754)desc. (#5723)realm_dart for deleting Atlas App Services applications. Usage: dart run realm_dart delete-apps. By default it will delete apps from http://localhost:9090 which is the endpoint of the local docker image. If --atlas-cluster is provided, it will authenticate, delete the application from the provided cluster. (PR #663)This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Configuration fields final so they can only be initialized in the constructor. This better conveys the immutability of the configuration class. (#455)inMemory field from Configuration. Use Configuration.inMemory factory instead.Configuration constructor has been removed. Use the Configuration.local factory instead. (#496)Configuration.disableFormatUpgrade. When set to true, opening a Realm with an older file format will throw an exception to avoid automatically upgrading it. (#310)Realm.isInTransaction that indicates whether the Realm instance has an open write transaction associated with it.Configuration.initialDataCallback. This is a callback executed when a Realm file is first created and allows you to populate some initial data necessary for your application. (#298)Configuration.shouldCompactCallback as option when configuring a Realm to determine if it should be compacted before being returned. (#466)SyncSession for a synchronized Realm via the realm.syncSession property.SyncSession API:
realmPath returning the path of the Realm for the session.state returning the current state of the session.connectionState returning the current state of the connection.connectionStateChanges returns a Stream that emits connection state updates.user returning the user that owns the session.pause() pauses synchronization.resume() resumes synchronization.waitForUpload/waitForDownload returns a Future that completes when the session uploaded/downloaded all changes.getProgressStream returns a Stream that emits progress updates.Realm.Shutdown method to allow normal process exit in Dart applications. (#617)realm_dart. Usage: dart run realm_dart deploy-apps. By default it will deploy apps to http://localhost:9090 which is the endpoint of the local docker image. If --atlas-cluster is provided, it will authenticate, create an application and link the provided cluster to it. (PR #309)test.dart/setupBaas() for the environment variables that control the Url and Atlas Cluster that will be used. If the BAAS_URL environment variable is not set, no apps will be imported and sync tests will not run. (PR #309)Nothing published for this version
This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.
This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.
Support change notifications on query results. (#208)
Every RealmResults<T> object now has a changes method returning a Stream<RealmResultsChanges<T>> which can be listened to.
final subscription = realm.all<Dog>().changes.listen((changes) {
changes.inserted // indexes of inserted objects
changes.modified // indexes of modified objects
changes.deleted // indexes of deleted objects
changes.newModified // indexes of modified objects after deletions and insertions are accounted for.
changes.moved // indexes of moved objects
}});
subscription.cancel(); // cancel the subscription
Support change notifications on list collections. (#261)
Every RealmList<T extends RealmObject> object now has a changes method returning a Stream<RealmListChanges<T>> which can be listened to.
final team = Team('team', players: [Person("player")]);
realm.write(() => realm.add(team));
var firstCall = true;
final subscription = team.players.changes.listen((changes) {
changes.inserted // indexes of inserted ojbects
changes.modified // indexes of modified objects
changes.deleted // indexes of deleted objects
changes.newModified // indexes of modified objects after deletions and insertions are accounted for.
changes.moved // indexes of moved objects
});
subscription.cancel(); // cancel the subscription
Support change notifications on realm objects. (#262)
Every managed RealmObject now has a changes method which allows to listen for object property changes.
var dog = realm.all<Dog>().first;
final subscription = dog.changes.listen((changes) {
changes.isDeleted // if the object has been deleted
changes.object // the RealmObject being listened to.
changes.properties // the changed properties
});
subscription.cancel(); // cancel the subscription
Added support for checking if realm lists and realm objects are valid. (#183)
Support query on lists of realm objects. (#239)
Every RealmList<T extends RealmObject> now has a query method.
final team = Team('Dream Team', players: [Person("Michael Jordan")]);
realm.write(() => realm.add(team)); // Object needs to be managed.
final result = team.players.query(r'name BEGINSWITH $0', ['M']);
Added support for opening realm in read-only mode. (#260)
Added support for opening in-memory realms. (#280)
Primary key fields no longer required to be final in data model classes (#240)
Previously primary key fields needed to be final.
@RealmModel()
class _Car {
@PrimaryKey()
late final String make; // previously
}
Now primary key fields no longer need to be final
@RealmModel()
class _Car {
@PrimaryKey()
late String make; // now
}
List fields no longer required to be final in data model classes. (#253)
Previously list fields needed to be final.
@RealmModel()
class _Car {
late final List<Person> owner; // previously
}
Now list fields no longer need to be final
@RealmModel()
class _Car {
late List<Person> owner; // now
}
Support custom FIFO special files. (#284)
Support flutter for Linux desktop. (#279)
This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.
This project is in the Alpha stage. All API's might change without warning and no guarantees are given about stability. Do not use it in production.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Your coding agent can read these notes before it upgrades. Set up the MCP server →