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
Hi @Cierra-Runis and thanks for filing an issue. I'd like to break down my response into 2 areas.
Printing the full contents of a RepositoryCommit
Using Freezed
If your main use case is for printing / debugging classes, I'd suggest another approach. It could be something like:
a utility method or collection of utility methods in your code for printing your desired output and passing in the RepositoryCommit you'd like to print
I'd rather not add another code generation library on top of or instead of JsonSerializable, especially with macros coming to Dart. There's a big opportunity to rethink and simplify this library once macros are A Thing™.
If you're ok with implementing something on your end until then, I'll probably close this issue and link it to a new one about using macros when they are available.
Freezed is a code generator for data-classes/unions/pattern-matching/cloning.
At frist I want to print the full content of model classes, I use
toJson()
and its output like:It can't print full content. With freezed, we can solve this issue.
Freezed has other benefits too, it prevent mutable classes and provide union types.
Freezed doesn't support extend or implement another Freezed class yet, but we can use it for some smaller classes.
The text was updated successfully, but these errors were encountered: