freezed icon indicating copy to clipboard operation
freezed copied to clipboard

Code generation for immutable classes that has a simple syntax/API without compromising on the features.

Results 136 freezed issues
Sort by recently updated
recently updated
newest added

**Describe the bug** _Continuation of #807_ When using a non-nullable (ie. its type bound forces it to be non-nullable) type parameter, but then marking a field of this type nullable,...

bug

We could have: ``` dart run freezed migrate ``` And for the given Freezed class: ```dart @freezed sealed class Example with _$Example { factory Example.data(int data) = ExampleData; factory Example.error(Object...

enhancement

Related to https://github.com/rrousselGit/freezed/issues/924 In a "Freezed 3.0" version, we could disable "when" by default (and enable its generation through build.yaml).

enhancement
breaking

**Describe the bug** Freezed can't generate class with records. **To Reproduce** What is currently working: ``` @freezed class DTO with _$DTO { const factory DTO({ int? id, required NestedDTO nested,...

bug

**Describe the bug** If you create a value of type `List` in State, and write it as shown in the attached image 1, there will be no errors when you...

bug
question

**Is your feature request related to a problem? Please describe.** We are currently in the process of publishing a library that uses freezed to generate it's data model. Naturally we...

enhancement
needs triage

Related to https://github.com/rrousselGit/freezed/issues/744 That error exists only due to limitations regarding `when`. If pattern-matching generation is disabled, we could do away with this error.

enhancement

Now that Dart 3 is here, those "when" functions are a bit redundant. Let's remove thousands of lines of code from the generated code.

enhancement

In that case it works only if fromJson is an arrow function: ```dart import 'package:freezed_annotation/freezed_annotation.dart'; part 'data.freezed.dart'; part 'data.g.dart'; @Freezed(genericArgumentFactories: true) class Data with _$Data { const factory Data({ required...

bug

```dart @freezed class A with _$A { factory A() = AImpl; } @freezed class B with _$B { factory B(AImpl a) = _B; } ``` This is especially useful for...

enhancement