Skip to content

Commit

Permalink
Elaborate CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsenko committed Feb 11, 2024
1 parent 95ea148 commit 45d6c2d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
## vNext (TBD)

### Breaking changes
* The generated parts are now named `.realm.dart` instead of `.g.dart`. This is because the builder is now a `PartBuilder`, instead of a `SharedPartBuilder`. This implies that other builders can consume the output.
* The 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`:
```dart
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();
}
```

### Enhancements
* None
Expand Down
2 changes: 1 addition & 1 deletion packages/realm_dart/lib/src/native/realm_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ class _RealmCore {
}
}

static void user_change_callback(Pointer<Void> userdata, int data) {
static void user_change_callback(Object userdata, int data) {
final controller = userdata as UserNotificationsController;

controller.onUserChanged();
Expand Down

0 comments on commit 45d6c2d

Please sign in to comment.