So for the foreseeable future we will not get macros coming to Dart. Now what in the heck do we do about it?
One of the areas we should look is in the value and data class areas as we have these things:
1. Both Value and Data classes are error prone to create manually.
2. Both Value and Data classes may have dependencies on validation
that are hard to implement fully by hand.
3. Data classes can depend on other data classes which makes validation
by hand somewhat almost impossible.
Someone created the Modddels package to solve all of these problems.
What I am about to show you works for:
-CleanArch
-DDD
-My Modification of DDD that I call FDD
-Hexagon
This articles covers the Value Object class part using the Modddels package. The next article will cover how to use the Modddels package to create the AggregateRoot(Model).
Keep reading with a 7-day free trial
Subscribe to Fred’s Flutter Newsletter to keep reading this post and get 7 days of free access to the full post archives.