You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm developing a large project using flutter with freezed.
Currently, I'm using freezed as "Data model generator". But, I felt I'm using freezed wrong way sometimes.
For example, In my project, There are so many ResponseModel classes to receive json data from server. Some models has many subtype as Union class.
When generate these classes using build_runner, It takes too much time and generate too many code lines (almost 160000 lines).So, I tried disable some options using @freezed() annotation, but freezed generated almost 12000 lines.
I know I'm using freezed as wrong way. But I don't know how can I resolve this confusing things.
Separating big data model file to small files is right way? Or there are another ways?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I'm developing a large project using flutter with freezed.
Currently, I'm using freezed as "Data model generator". But, I felt I'm using freezed wrong way sometimes.
For example, In my project, There are so many ResponseModel classes to receive json data from server. Some models has many subtype as Union class.
When generate these classes using build_runner, It takes too much time and generate too many code lines (almost 160000 lines).So, I tried disable some options using @freezed() annotation, but freezed generated almost 12000 lines.
I know I'm using freezed as wrong way. But I don't know how can I resolve this confusing things.
Separating big data model file to small files is right way? Or there are another ways?
Thank you for reading this Question.
Beta Was this translation helpful? Give feedback.
All reactions