Skip to content

Commit

Permalink
Corrected error
Browse files Browse the repository at this point in the history
  • Loading branch information
papafe committed Jun 14, 2024
1 parent f81d9ab commit e8d4d81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/realm_dart/lib/src/set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ class UnmanagedRealmSet<T extends Object?> extends collection.DelegatingSet<T> w

@override
// ignore: unused_element
RealmObjectMetadata? get _metadata => throw RealmError("Unmanaged RealmSets don't have metadata associated with them.");
RealmObjectMetadata? get _metadata => throw RealmError("Unmanaged sets don't have metadata associated with them.");

@override
// ignore: unused_element
set _metadata(RealmObjectMetadata? _) => throw RealmError("Unmanaged RealmSets don't have metadata associated with them.");
set _metadata(RealmObjectMetadata? _) => throw RealmError("Unmanaged sets don't have metadata associated with them.");

@override
bool get isValid => true;

@override
Stream<RealmSetChanges<T>> get changes => throw RealmStateError("Unmanaged RealmSets don't support changes");
Stream<RealmSetChanges<T>> get changes => throw RealmStateError("Unmanaged sets don't support changes");

@override
RealmResults<T> asResults() => throw RealmStateError("Unmanaged sets can't be converted to results");
Expand Down
4 changes: 2 additions & 2 deletions packages/realm_dart/test/realm_set_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,8 @@ void main() {
test('UnmanagedSet.changes throws', () {
final set = TestRealmSets(1);

expect(() => set.objectsSet.changes, throws<RealmStateError>("Unmanaged RealmSets don't support changes"));
expect(() => set.objectsSet.changesFor(["test"]), throws<RealmStateError>("Unmanaged RealmSets don't support changes"));
expect(() => set.objectsSet.changes, throws<RealmStateError>("Unmanaged sets don't support changes"));
expect(() => set.objectsSet.changesFor(["test"]), throws<RealmStateError>("Unmanaged sets don't support changes"));
});

test('RealmSet.changes - await for with yield ', () async {
Expand Down

0 comments on commit e8d4d81

Please sign in to comment.