Open Silfalion opened 1 year ago
You could manually override the getter to return an UnmodifiableListView
True, thank you. Though would a PR be welcomed for this? Not necessary now, but I could give it a try if you see it's relevant enough
Not for now. Freezed generally doesn't do field-specific thing. Like how we can't exclude one field from copyWith/==
I understand. Well, thank you for your answer, appreciate it
Is your feature request related to a problem? Please describe. I have 2 unions classes, with a collection each, the collections are different from one another(not the same name). The second class collection need to be unmodifiable while on the other hand the first should be modifiable
Describe the solution you'd like Ideallt, the first class should be modifiable while keeping the second one unmodifiable
Describe alternatives you've considered I didn't see any, at least for now, though maybe a CollectionModifiable or CollectionUnmodifiable annotations would come in handy here?
Additional context
Thank you taking the time to read this issue