numen31337/copy_with_extension

Generator does not detect private constructors

mateusfccp opened this issue · 2 comments

It's a very common pattern to make the default constructor private (like MyObject._(...params)) and provide other public constructors.

I think it would be good if the generator could detect this pattern and generate the copyWith method with the "unamed private constructor".

I believe this specific case is mentioned in the documentation here.

You are right, I only had looked at the pub.dev page. I think we could include this there too, as it's a common case.