Closed wxxedu closed 5 months ago
As an initial implementation, we may have to narrow down the scope by quite a bit by rejecting some valid freezed
APIs. Also since we are dealing with models and it is unclear yet how a model would be having an "algebraic" type, we would disallow the syntax for "freezed" unions as well. -- they may be a good way of dealing with migrations...
For now, we assume that in the freezed factory constructor, only named constructors are applied.
Todos:
I would say that #6 and #7 are not that relevant to this issue and may be sort-of separate to this freezed-migration thing. Hence, let's close this issue for now.
Currently, the API requires the user to write a lot of boilerplate code. This is because in the initial design of our API, we tried to follow
Isar
's API design. The problem is, instead of storing fields as they are, we store the fields inside wrapper classes. Requiring the user to write wrapper classes would be too much boilerplate every time.After looking into it, I think that it would be best if we could adapt the code generator to be based on a
freezed
-like style.