realm_common 1.0.1 realm_common: ^1.0.1 copied to clipboard
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.
1.0.1 (2023-02-14) #
1.0.0 (2023-02-07) #
GA release #
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.
Enhancements #
- Improved error information returned when the
realm_dart
library failed to load. (#1143)
Fixed #
- Improve performance of interprocess mutexes on iOS which don’t need to support reader-writer locking. The primary beneficiary of this is beginning and ending read transactions, which is now almost as fast as pre-v13.0.0 (Core upgrade).
Compatibility #
- Realm Studio: 13.0.0 or later.
Internal #
- Using Core 13.4.0
0.11.0+rc (2023-01-30) #
This project is in Release Candidate stage.
Enhancements #
- Add
App.reconnect()
providing a hint to Realm to reconnect all sync sessions. - Add
Realm.refresh()
andRealm.refreshAsync()
support. (#1046) - Support change notifications property
isCleared
on list collections and sets. (#1128)
Fixed #
SyncSession.pause()
allow users to suspend a Realm's sync session until it is explicitly resumed withSyncSession.resume()
. Previously it could be implicitly resumed in rare cases. (Core upgrade)- Improve the performance of
Realm.freeze()
and friends (RealmObject.freeze()
,RealmList.freeze(), RealmResults.freeze(), RealmSet.freeze()
) by eliminating some redundant work around schema initialization and validation. (Core upgrade) - Include more details if an error occurs when merging object. (Core upgrade)
- Value in List of Mixed would not be updated if new value is Binary and old value is StringData and the values otherwise matches. (Core upgrade)
- When client reset with recovery is used and the recovery does not actually result in any new local commits, the sync client may have gotten stuck in a cycle with a
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) - Fixed diverging history in flexible sync if writes occur during bootstrap to objects that just came into view (Core upgrade)
- Fix several data races when opening cached frozen Realms. New frozen Realms were added to the cache and the lock released before they were fully initialized, resulting in races if they were immediately read from the cache on another thread (Core upgrade).
- Properties and types not present in the requested schema would be missing from the reported schema in several scenarios, such as if the Realm was being opened with a different schema version than the persisted one, and if the new tables or columns were added while the Realm instance did not have an active read transaction. (Core upgrade, since v13.2.0)
- If a client reset w/recovery or discard local is interrupted while the "fresh" realm is being downloaded, the sync client may crash (Core upgrade)
- Changesets from the server sent during FLX bootstrapping that are larger than 16MB can cause the sync client to crash with a LogicError. (Core upgrade)
- Online compaction may cause a single commit to take a long time. (Core upgrade, since v13.0.0)
Compatibility #
- Realm Studio: 13.0.0 or later.
Internal #
- Using Core 13.3.0
- Added specific codes to
SyncResolveErrorCode
enum's items. (#1131.
0.10.0+rc (2023-01-23) #
This project is in Release Candidate stage.
Enhancements #
- Add support for Realm set data type. (#1102)
- Exposed realm
writeCopy
API to copy a Realm file and optionally encrypt it with a different key. (#1103)
Fixed #
- Added an error for default values for Realm object references in the Realm generator. (#1102)
realm.deleteMany()
will handle efficiently ManagedRealmList instances. (#1117)
Compatibility #
- Realm Studio: 13.0.0 or later.
Internal #
- Using Core 13.2.0.
0.9.0+rc (2023-01-13) #
This project is in Release Candidate stage.
Breaking Changes #
- File format version bumped.
- The layout of the lock-file has changed, the lock file format version is bumped and all participants in a multiprocess scenario needs to be up to date so they expect the same format. This requires an update of Studio. (Core upgrade)
- Writing to a frozen realm throws
RealmException
instead ofRealmError
. (#974)
Enhancements #
- Support setting
maxNumberOfActiveVersions
when creating aConfiguration
. (#1036) - Add List.move extension method that moves an element from one index to another. Delegates to ManagedRealmList.move for managed lists. This allows notifications to correctly report moves, as opposed to reporting moves as deletes + inserts. (#1037)
- Support setting
shouldDeleteIfMigrationNeeded
when creating aConfiguration.local
. (#1049) - Add
unknown
error code to all SyncErrors:SyncSessionErrorCode.unknown
,SyncConnectionErrorCode.unknown
,SyncClientErrorCode.unknown
,GeneralSyncErrorCode.unknown
. Useunknown
error code instead of throwing a RealmError. (#1052) - Add support for
RealmValue
data type. This new type can represent any valid Realm data type, including objects. Lists ofRealmValue
are also supported, butRealmValue
itself cannot contain collections. Please note that a property of typeRealmValue
cannot be nullable, but can contain null, represented by the valueRealmValue.nullValue()
. (#1051) - Add support for querying using the model property names, even when the properties are mapped to a different name in the database. (#697)
ClientResetError.resetRealm
now returns a bool to indicate if reset was initiated or not. (#1067)- Support
SyncErrorCategory.resolve
,SyncResolveError
andSyncResolveErrorCode
for network resolution errors when sync.
Fixed #
- Support mapping into
SyncSessionErrorCode
for "Compensating write" with error code 231. (#1022) - Errors from core will be raised correctly for
beginWriteAsync
andcommitAsync
. (#1042) - The realm file will be shrunk if the larger file size is no longer needed. (Core upgrade)
- Most of the file growth caused by version pinning is eliminated. (Core upgrade)
- Fetching a user's profile while the user logs out would result in an assertion failure. (Core upgrade)
- Removed the ".tmp_compaction_space" file being left over after compacting a Realm on Windows. (Core upgrade).
- Restore fallback to full barrier when F_BARRIERSYNC is not available on Apple platforms. (Core upgrade, since v0.8.0+rc)
- Fixed wrong assertion on query error that could result in a crash. (Core upgrade)
- Writing to a read-only realm throws
RealmException
instead of blocking the isolate. (#974) - Fix no notification for write transaction that contains only change to backlink property. (Core upgrade)
- Fixed wrong assertion on query error that could result in a crash. (Core upgrade)
- Use random tmp directory for download. (#1060)
- Bump minimum Dart SDK version to 2.17.5 and Flutter SDK version to 3.0.3 due to an issue with the Dart virtual machine when implementing
Finalizable
. (dart-lang/sdk#49075) - Support install command in flutter projects that use unit and widget tests. (#870)
Compatibility #
- Realm Studio: 13.0.0 or later.
- Fileformat: Generates files with format v23. Reads and automatically upgrades from fileformat v5.
Internal #
0.8.0+rc (2022-11-14) #
This project is in Release Candidate stage.
Breaking Changes #
FunctionsClient.call
no longer accepts a null for the optionalfunctionsArgs
parameter, but it is still optional. (#1025)
Fixed #
- Allow backlinks between files. (#1015)
- Fix issue with accessing properties after traversing a backlink. (#1018)
- Bootstraps will not be applied in a single write transaction - they will be applied 1MB of changesets at a time, or as configured by the SDK (Core upgrade).
- Fix database corruption and encryption issues on apple platforms. (Core upgrade)
Compatibility #
- Realm Studio: 12.0.0 or later.
Internal #
- Using Core 12.12.0.
0.7.0+rc (2022-11-04) #
This project is in Release Candidate stage.
Breaking Changes #
- SyncClientResetErrorHandler is renamed to ClientResetHandler. SyncClientResetError is renamed to ClientResetError. ManualSyncClientResetHandler is renamed to ManualRecoveryHandler.
- Default resync mode for
FlexibleSyncConfiguration
is changed frommanual
torecoverOrDiscard
. In this mode Realm attempts to recover unsynced local changes and if that fails, then the changes are discarded. (#925) - Added
path
parameter toConfiguration.disconnectedSync
. This path is required to open the correct synced realm file. (#1007)
Enhancements #
- Added
MutableSubscriptionSet.removeByType
for removing subscriptions by their realm object type. (#317) - Added
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) - Support results of primitives, ie.
RealmResult<int>
. (#162) - Support notifications on all managed realm lists, including list of primitives, ie.
RealmList<int>.changes
is supported. (#893) - Support named backlinks on realm models. You can now add and annotate a realm object iterator field with
@Backlink(#fieldName)
. (#996) - Added Realm file compaction support. (#1005)
- Allow
@Indexed
attribute on all indexable type, and ensure appropriate indexes are created in the realm. (#797) - Add
parent
getter on embedded objects. (#979) - Support Client Resets. Atlas App Services automatically detects the need for client resets and the realm client automatically performs it according to the configured callbacks for the type of client reset handlers set on
FlexibleSyncConfiguration
. A parameterclientResetHandler
is added toConfiguration.flexibleSync
. Supported client reset handlers areManualRecoveryHandler
,DiscardUnsyncedChangesHandler
,RecoverUnsyncedChangesHandler
andRecoverOrDiscardUnsyncedChangesHandler
.RecoverOrDiscardUnsyncedChangesHandler
is the default strategy. (#925) An example usage of the defaultclientResetHandler
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
},
)
);
Fixed #
- Fixed a wrong mapping for
AuthProviderType
returned byUser.provider
for google, facebook and apple credentials. - Opening an unencrypted file with an encryption key would sometimes report a misleading error message that indicated that the problem was something other than a decryption failure (Core upgrade)
- Fix a rare deadlock which could occur when closing a synchronized Realm immediately after committing a write transaction when the sync worker thread has also just finished processing a changeset from the server. (Core upgrade)
- Fixed an issue with
Configuration.disconnectedSync
where changing the schema could result in migration exception. (#999) - Added a better library load failed message. (#1006)
Compatibility #
- Realm Studio: 12.0.0 or later.
Internal #
- Using Core 12.11.0.
0.6.0+beta (2022-10-21) #
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Enhancements #
- Added support for asynchronous transactions. (Issue #802)
- Added
Transaction
which is a class that exposes an API for committing and rolling back an active transaction. - Added
realm.beginWriteAsync
which returns aFuture<Transaction>
that resolves when the write lock has been obtained. - Added
realm.writeAsync
which opens an asynchronous transaction, invokes the provided callback, then commits the transaction asynchronously.
- Added
- Support
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) - Add support for embedded objects. Embedded objects are objects which are owned by a single parent object, and are deleted when that parent object is deleted or their parent no longer references them. Embedded objects are declared by passing
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;
}
Fixed #
- Added more validations when using
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) - Fixed
dart run realm_dart generate
andflutter pub run realm generate
commands to exit with the correct error code on failure. - Added more descriptive error messages when passing objects managed by another Realm as arguments to
Realm.add/delete/deleteMany
. (PR #942) - Fixed a bug where
list.remove
would not correctly remove the value if the value is the first element in the list. (PR #975)
Compatibility #
- Realm Studio: 12.0.0 or later.
Internal #
- Using Core 12.9.0
0.5.0+beta (2022-10-10) #
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Breaking Changes #
- Fixed an issue that would cause passwords sent to the server (e.g.
Credentials.EmailPassword
orEmailPasswordAuthProvider.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.
Enhancements #
- Added support for "frozen objects" - these are objects, queries, lists, or Realms that have been "frozen" at a specific version. All frozen objects can be accessed and queried as normal, but attempting to mutate them or add change listeners will throw an exception.
Realm
,RealmObject
,RealmList
, andRealmResults
now have a methodfreeze()
which returns an immutable version of the object, as well as anisFrozen
property which can be used to check whether an object is frozen. (#56) - You can now set a realm property of type
T
to any objecto
whereo is T
. Previously it was required thato.runtimeType == T
. (#904) - Performance of indexOf on realm lists has been improved. It now uses realm-core instead of the generic version from ListMixin. (#911)
- Performance of remove on realm list has been improved. It now uses indexOf and removeAt. (#915)
- Added support for migrations for local Realms. You can now construct a configuration with a migration callback that will be invoked if the schema version of the file on disk is lower than the schema version supplied by the callback. (#70)
Example:
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')); } } });
- Added support for realm list of nullable primitive types, ie.
RealmList<int?>
. (#163) - Allow null arguments on query. (#871)
- Added support for API key authentication. (Issue #432)
- Expose
User.apiKeys
client - this client can be used to create, fetch, and delete API keys. - Expose
Credentials.apiKey
that enable authentication with API keys.
- Expose
- Exposed
User.accessToken
andUser.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) - Added support for
encryptionKey
toConfiguration.local
,Configuration.flexibleSync
andConfiguration.disconnectedSync
so realm files can be encrypted and existing encrypted files from other Realm sources opened (assuming you have the key)(#920)
Fixed #
- Previously removeAt did not truncate length. (#883)
- List.length= now throws, if you try to increase length. This previously succeeded silently. (#894).
- Queries on lists were broken. (#909)
Example:
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>()
- Queries on results didn't filter the existing results. (#908).
Example
expect(realm.query<Person>('FALSEPREDICATE').query('TRUEPREDICATE'), isEmpty); //<-- Fails if a Persion object exists
- Fixed copying of native structs for session errors and http requests. (#924)
- Fixed a crash when closing the SyncSession on App instance teardown. (#5752)
- Fixed sporadic generator failure. (#879)
- Exceptions thrown by user code inside the
Configuration.initialDataCallback
are now properly surfaced back to theRealm()
constructor. (#698)
Compatibility #
- Realm Studio: 12.0.0 or later.
Internal #
- Uses Realm Core v12.9.0
- Added tracking of child handles for objects/results/lists obtained from an unowned Realm. This ensures that all children are invalidated as soon as the parent Realm gets released at the end of the callback. (Issue #527)
- Added an action to enforce that the changelog is updated before a PR is merged (Issue #939)
0.4.0+beta (2022-08-19) #
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Breaking Changes #
- Changed the name of
Configuration.schema
toConfiguration.schemaObjects
and changed its type toIterable<SchemaObject>
. You can now access the Realm's schema via the newRealm.schema
property. #495)
Enhancements #
- Expose an API for string-based access to the objects in the
Realm
. Those are primarily intended to be used during migrations, but are available at all times for advanced use cases. #495) - Added
Realm.schema
property exposing the Realm's schema as passed through the Configuration or read from disk. #495)
Fixed #
- Lifted a limitation that only allowed non-nullable primary keys. (#458)
- Fix boolean values get/set after ffigen update. (#854)
Compatibility #
- Realm Studio: 12.0.0 or later.
Internal #
- Uses Realm Core v12.5.1
0.3.2+beta (2022-08-16) #
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Enhancements #
- Added
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) - Support better default paths on Flutter. (#665)
- Support
Configuration.defaultRealmName
for setting the default realm name. (#665) - Support
Configuration.defaultRealmPath
for setting a custom default path for realms. (#665) - Support
Configuration.defaultStoragePath
for getting the platform specific storage paths. (#665) - Support
App.deleteUser
for deleting user accounts. (#679) - Support Apple, Facebook and Google authentication. (#740)
- Allow multiple anonymous sessions. When using anonymous authentication you can now easily log in with a different anonymous user than last time. (#750).
- Support
Credentials.jwt
for login user with JWT issued by custom provider . (#715) - Support
Credentials.function
for login user with Custom Function Authentication Provider. (#742) - Added
update
flag onRealm.add
andRealm.addAll
to support upserts. (#668) - Allow multiple anonymous sessions. (PR #5693).
- Introducing query parser support for constant list expressions such as
fruit IN {'apple', 'orange'}
. This also includes general query support for list vs list matching such asNONE fruits IN {'apple', 'orange'}
. (Issue #4266) - SubscriptionSet::refresh() does less work if no commits have been made since the last call to refresh(). (PR #5695)
- Reduce use of memory mappings and virtual address space (PR #5645). Also fixes some errors (see below)
Fixed #
- Use Dart 2.17
Finalizable
to ensure lexically scoped lifetime of finalizable resources (Realm, App, etc.). (#754) - Fix crash after hot-restart. (#711 and PR #5570)
- Processing a pending bootstrap before the sync client connects will properly surface errors to the user's error handler (#5707, since Realm Core v12.0.0)
- Using the Query Parser, it was not allowed to query on a property named
desc
. (#5723) - Improved performance of sync clients during integration of changesets with many small strings (totalling > 1024 bytes per changeset) on iOS 14, and devices which have restrictive or fragmented memory. (#5614)
- Fixed a segfault in sync compiled by MSVC 2022. (#5557, since Realm Core 12.1.0)
- Fix a data race when opening a flexible sync Realm (since Realm Core v12.1.0).
- Fixed an issue on Windows that would cause high CPU usage by the sync client when there are no active sync sessions. (Issue #5591, since the introduction of Sync support for Windows)
- Fix a data race when committing a transaction while multiple threads are waiting for the write lock on platforms using emulated interprocess condition variables (most platforms other than non-Android Linux).
- Fix some cases of running out of virtual address space (seen/reported as mmap failures) (PR #5645)
Internal #
- Added a command to
realm_dart
for deleting Atlas App Services applications. Usage:dart run realm_dart delete-apps
. By default it will delete apps fromhttp://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) - Uses Realm Core v12.5.1
0.3.1+beta (2022-06-07) #
0.3.0+beta (2022-06-02) #
This project is in the Beta stage. The API should be quite stable, but occasional breaking changes may be made.
Breaking Changes #
- Made all
Configuration
fields final so they can only be initialized in the constructor. This better conveys the immutability of the configuration class. (#455) - Removed
inMemory
field fromConfiguration
. UseConfiguration.inMemory
factory instead. - Due to the introduction of different types of configurations the
Configuration
constructor has been removed. Use theConfiguration.local
factory instead. (#496)
Enhancements #
- Added a property
Configuration.disableFormatUpgrade
. When set totrue
, opening a Realm with an older file format will throw an exception to avoid automatically upgrading it. (#310) - Support result value from write transaction callbacks. (#294)
- Added a property
Realm.isInTransaction
that indicates whether the Realm instance has an open write transaction associated with it. - Support anonymous application credentials. (#443)
- Added a property
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) - Support app configuration. (#306)
- Support app class. (#446)
- Support should realm compact on open callback
Configuration.shouldCompactCallback
as option when configuring a Realm to determine if it should be compacted before being returned. (#466) - Support ObjectId type. (#468)
- Support Uuid type. (#470)
- Support application login. (#469)
- Support app configuration log level and request timeout.(#566)
- Support EmailPassword register user. (#452)
- Support EmailPassword confirm user. (#478)
- Support EmailPassword resend user confirmation email. (#479)
- Support EmailPassword complete reset password. (#480)
- Support EmailPassword reset password. (#481)
- Support EmailPassword calling custom reset password functions. (#482)
- Support EmailPassword retry custom user confirmation functions. (#484)
- Expose currentUser property on App. (473)
- Support remove user. (#492)
- Support switch current user. (#493)
- Support user custom data and refresh. (#525)
- Support linking user credentials. (#525)
- Support user state. (#525)
- Support getting user id and identities. (#525)
- Support user logout. (#525)
- Support user deviceId. (#570)
- Support user authentication provider type. (#570)
- Support user profile data. (#570)
- Support flexible synchronization. (#496)
- Added support for DateTime properties. (#569)
- Support setting logger on AppConfiguration. (#583)
- Support setting logger on Realm class. Default is to print info message or worse to the console. (#583)
- Support getting the
SyncSession
for a synchronized Realm via therealm.syncSession
property. - Support the following
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.
- Support SyncErrorHandler in FlexibleSyncConfiguration. (#577)
- Support SyncClientResetHandler in FlexibleSyncConfiguration. (#608)
- [Dart] Added
Realm.Shutdown
method to allow normal process exit in Dart applications. (#617)
Fixed #
- Fixed an issue that would result in the wrong transaction being rolled back if you start a write transaction inside a write transaction. (#442)
- Fixed boolean value persistence (#474)
Internal #
- Added a command to deploy an Atlas App Services application to
realm_dart
. Usage:dart run realm_dart deploy-apps
. By default it will deploy apps tohttp://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) - Unit tests will now attempt to lookup and create if necessary Atlas App Services applications (similarly to the above mentioned command). See
test.dart/setupBaas()
for the environment variables that control the Url and Atlas Cluster that will be used. If theBAAS_URL
environment variable is not set, no apps will be imported and sync tests will not run. (PR #309) - Uses Realm Core v12.1.0
Compatibility #
- Dart ^2.17 on Windows, MacOS and Linux
- Flutter ^3.0 on Android, iOS, Linux, MacOS and Windows
0.2.1+alpha Release notes (2022-03-20) #
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.
Enhancements #
-
Support change notifications on query results. (#208)
Every
RealmResults<T>
object now has achanges
method returning aStream<RealmResultsChanges<T>>
which can be listened to.final subscription = realm.all<Dog>().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 list collections. (#261)
Every
RealmList<T extends RealmObject>
object now has achanges
method returning aStream<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
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)
Fixed #
- Snapshot the results collection when iterating collections of realm objects. (#258)
Compatibility #
- Dart ^2.15 on Windows, MacOS and Linux
- Flutter ^2.10 on Android, iOS, Linux, MacOS and Windows
0.2.0+alpha Release notes (2022-01-31) #
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.
Enhancements #
- Completely rewritten from the ground up with sound null safety and using Dart FFI
Compatibility #
- Dart ^2.15 on Windows, MacOS and Linux
0.2.0-alpha.2 Release notes (2022-01-29) #
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Enhancements #
- Completеly rewritten from the ground up with sound null safety and using Dart FFI
Fixed #
- Fix running package commands.
Compatibility #
- Dart ^2.15 on Windows, MacOS and Linux
0.2.0-alpha.1 Release notes (2022-01-29) #
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Enhancements #
- Completеly rewritten from the ground up with sound null safety and using Dart FFI
Fixed #
- Realm close stops internal scheduler.
Internal #
- Fix linter issues
Compatibility #
- Dart ^2.15 on Windows, MacOS and Linux
0.2.0-alpha Release notes (2022-01-27) #
Notes: This release is a prerelease version. All API's might change without warning and no guarantees are given about stability.
Enhancements #
- Completеly rewritten from the ground up with sound null safety and using Dart FFI
Compatibility #
- Dart ^2.15 on Windows, MacOS and Linux
Internal #
- Uses Realm Core v11.9.0
0.1.1+preview Release notes (2021-04-01) #
Fixed #
realm_dart install
command is correctly installing the realm native binary
Compatibility #
- Windows and Mac
- Dart SDK 2.12 stable from https://dart.dev/
0.1.0+preview Release notes (2021-04-01) #
Enhancements #
- The initial preview version of the Realm SDK for Dart.
Compatibility #
- Windows and Mac
- Dart SDK 2.12 stable from https://dart.dev/