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
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,5 @@
1
1
## Unreleased 3.0.0
2
2
3
-
### Breaking changes:
4
-
5
-
-**Breaking**: Removed `map/when` and variants. These have been discouraged since Dart got pattern matching.
6
-
-**Breaking**: Freezed classes should now either be `abstract`, `sealed`, or manually implements `_$MyClass`.
7
-
8
3
### New: Mixed mode
9
4
10
5
Freezed 3.0 is about supporting a "mixed mode".
@@ -161,18 +156,21 @@ This feature offers fine-grained control over every parts of your models.
161
156
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
157
`with Result<T>` instead.
163
158
164
-
### New: private unions
165
-
166
-
It is now possible to have a private constructor for unions:
159
+
### Other changes:
167
160
168
-
```dart
169
-
@freezed
170
-
sealed class Result<T> with _$Result {
171
-
// It wasn't possible to write _data before, but now is.
172
-
factory Result._data(T data) = ResultData;
173
-
factory Result.error(Object error) = ResultError;
174
-
}
175
-
```
161
+
-**Breaking**: Removed `map/when` and variants. These have been discouraged since Dart got pattern matching.
162
+
-**Breaking**: Freezed classes should now either be `abstract`, `sealed`, or manually implements `_$MyClass`.
163
+
- When formatting is disabled (default), Freezed now generates `// dart format off`. This
164
+
prevents having to exclude generated file from formatting check in the CI.
165
+
- It is now possible to have a private constructor for unions:
166
+
```dart
167
+
@freezed
168
+
sealed class Result<T> with _$Result {
169
+
// It wasn't possible to write _data before, but now is.
0 commit comments