Trying to make freezed work for hierarchy of generic classes, but get the error that the copyWith implementation cannot be generated #1290
Unanswered
TB-StarcMed
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to make a hierarchy of generic classes work, but get the error that the copyWith implementation cannot be generated since the parameter
valueis not cloneable. The following is the (obfuscated) source code for this example:I get the error:
Even if I change the source code to the following (because I do necessarily need the copyWith function), I get the same error in the output from the build_runner.
What can I do to make this work?
How could I make sure that
valueis accessible from the copyWith method (which would be the 3rd option of the 3 suggested fixes in the output)?As of my research, I have found the following tickets, that are all still open and related to each other:
copyWith, despite being accessible. #1231copyWith, despitecopyWithbeing disabled #1230Beta Was this translation helpful? Give feedback.
All reactions