LezdCS / irl-link

📱 A mobile application to monitor your IRL stream.
https://www.irllink.com
GNU General Public License v3.0
33 stars 6 forks source link

Remove Equatable and use Freezed for the DTOs #286

Closed LezdCS closed 17 hours ago

LezdCS commented 3 days ago

Right now, the architecture is a mess, Equatable is used on the entities when it should be on the DTO for example.

We need to rebuild the logic following the correct implementation of the clean architecture, good example here: https://medium.com/@lennarddeurman/implementations-of-a-clean-architecture-in-flutter-projects-14b265a2de2f

Basically : rewrite the entities and DTOs

LezdCS commented 3 days ago

For now on develop branch : removed Equatable, cleaned the entities so there is no logic in it such as toJson and fromJson. Use of the package auto_mappr to make it easy to map my entities into the according DTO

LezdCS commented 2 days ago

To respect clean architecture logic, we need to remove the extends on DTOs. Once done, let's implement freezed (and json_serializable) to have clean toJson and fromJson

LezdCS commented 1 day ago

Also, the settings DTOs should actually be DAOs because it is LOCAL STORAGE

LezdCS commented 17 hours ago

ok on dev branch