rinukkusu / spotify-dart

A dart library for interfacing with the Spotify API.
BSD 3-Clause "New" or "Revised" License
206 stars 92 forks source link

Update models #130

Closed whosramoss closed 1 year ago

whosramoss commented 2 years ago

Update Models

Hi, I would like to contribute to the project by adding more customized toString() methods with explicit and formatted information for models, so we can check all the parameters when printing a specific model.

Example

image1 image2
BrunoJurkovic commented 1 year ago

I am against of this manual method of adding toString. How about replacing the model generation with freezed to handle equality, toString, copyWith, etc. behind the hood?

@rinukkusu

rinukkusu commented 1 year ago

@whosramoss thanks for your contribution, but I don't see the value of this to be frank. I don't think I would add this just for debugging purposes and if, then ideally it should be automatically generated.

@BrunoJurkovic I've been very detached from current Dart development for the last 2 years. From what I understand this is a de-/serialisation package like json_serializable? It seems to have similar popularity on pub.dev - what are the pros and cons?

whosramoss commented 1 year ago

@rinukkusu It really makes sense that this method is automatically generated rather than manually implemented, good point 👍