You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/freezed/CHANGELOG.md
+13
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,19 @@ This feature offers fine-grained control over every parts of your models.
161
161
Unfortunately, it is kind of required to "extend" the parent class (so here `extends Result<T>`). This is because Dart doesn't support `sealed mixin class`, so you can't do
162
162
`with Result<T>` instead.
163
163
164
+
### New: private unions
165
+
166
+
It is now possible to have a private constructor for unions:
167
+
168
+
```dart
169
+
@freezed
170
+
sealed class Result<T> with _$Result {
171
+
// It wasn't possible to write _data before, but now is.
0 commit comments