jankuss / genq

Instant Data Class Generation for Dart
MIT License
133 stars 0 forks source link

Is it possible to extend a Genq class with another Genq class? #21

Open imSanjaySoni opened 4 months ago

imSanjaySoni commented 4 months ago

Currently, Freezed does not support inheritance and there are no plans for it in the future refer to this for context Support Freezed classes extending another Freezed class. #907.

I am curious to know if Genq supports it, as it could be a game-changer.

jankuss commented 4 months ago

This feature would be hard to implement in the scope of genq. We can generate code for a file only with the information contained in the file. Extending other classes also implies the potential to import classes from other files, which genq can't see.

Also, the issue you linked involves other named constructors for a class. genq does not support this at this time.