Replies: 1 comment 1 reply
-
The meaning of defining multiple constructors is different in Freezed You defined a union type. But you clearly doesn't want a union A plain classes likely makes more sense. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Running build_runner generates code with no errors nor warnings, but the generated abstract class does not have a getter for
list
.It is resolved if some default value is set as below.
However, it is pointless to have two constructors with the same argument and default value. It does not make sense either that the constructor with the name "empty" can be given a value and become non-empty.
If Freezed is not used:
It seems like a bug if what is possible without Freezed is impossible with Freezed. Is it a known issue and documented anywhere? This was unexpected for me and it took me quite some time to realise the cause.
Beta Was this translation helpful? Give feedback.
All reactions