From 9ca12977343d23c83e3cf6140741bb638ee52238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Thu, 18 Apr 2024 14:09:03 +0200 Subject: [PATCH] Update CHANGELOG --- CHANGELOG.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7843f25de..c892b82ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,25 @@ ## vNext (TBD) ### Enhancements -* None +* Allow configuration of generator per model class. Currently support specifying the constructor style to use. + ```dart + 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: + ```dart + Person({ + required String name, + int age = 42, + }) { ... } + ``` + (Issue [#292](https://github.com/realm/realm-dart/issues/292)) ### Fixed * None