Fred’s Flutter Newsletter

Fred’s Flutter Newsletter

Share this post

Fred’s Flutter Newsletter
Fred’s Flutter Newsletter
No Flutter Macros Now What

No Flutter Macros Now What

Auto Generating Value Object Classes

Fred Grott's avatar
Fred Grott
Feb 03, 2025
∙ Paid

Share this post

Fred’s Flutter Newsletter
Fred’s Flutter Newsletter
No Flutter Macros Now What
1
Share

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).

Share

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.

Already a paid subscriber? Sign in
© 2025 Fred Grott
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share