forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new collection listener properties
- Loading branch information
1 parent
b5987c8
commit cb37f5c
Showing
6 changed files
with
117 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/examples/generated/flutter/react_to_changes_test.snippet.pause-resume-subscription.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
subscription.pause(); | ||
// the changes.listen() method won't fire until the subscription is resumed | ||
// The changes.listen() method won't fire until subscription is resumed. | ||
subscription.resume(); |
16 changes: 8 additions & 8 deletions
16
source/examples/generated/flutter/react_to_changes_test.snippet.query-change-listener.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
.../examples/generated/flutter/react_to_changes_test.snippet.realm-list-change-listener.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
final fellowshipSubscription = | ||
fellowshipOfTheRing.members.changes.listen((changes) { | ||
changes.inserted; // indexes of inserted Realm objects | ||
changes.modified; // indexes of modified Realm objects | ||
changes.deleted; // indexes of deleted Realm objects | ||
changes.newModified; // indexes of modified Realm objects | ||
// after deletions and insertions are accounted for | ||
changes.moved; // indexes of moved Realm objects | ||
changes.list; // the full RealmList of Realm objects | ||
// `true` after call to fellowshipOfTheRing.members.clear(). | ||
// Otherwise false. | ||
changes.isCleared; | ||
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 accounting for deletions & insertions. | ||
changes.moved; // Indexes of moved objects. | ||
changes.list; // The full RealmList of objects. | ||
changes.isCleared; // `true` after call to fellowshipOfTheRing.members.clear(); otherwise, `false`. | ||
changes.isCollectionDeleted; // `true` if the collection is deleted; otherwise, `false`. | ||
}); |
6 changes: 3 additions & 3 deletions
6
...xamples/generated/flutter/react_to_changes_test.snippet.realm-object-change-listener.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
final frodoSubscription = frodo.changes.listen((changes) { | ||
changes.isDeleted; // if the object has been deleted | ||
changes.object; // the RealmObject being listened to, `frodo` | ||
changes.properties; // the changed properties | ||
changes.isDeleted; // If the object has been deleted. | ||
changes.object; // The RealmObject being listened to, `frodo`. | ||
changes.properties; // The changed properties. | ||
}); |
Oops, something went wrong.