Fred’s Flutter Newsletter

Fred’s Flutter Newsletter

Easy Way To Build Flutter Value Classes

All About Value Objects

Fred Grott's avatar
Fred Grott
Feb 09, 2025
∙ Paid
1
Share

Currently, the proposal to add Value Classes #3298

Add value types & value semantics for deep immutability (w/ compile-time enforcement)

https://github.com/dart-lang/language/issues/3298

Is tied up in how Data Classes proposal and the proposal to eliminate const and use instead value and data classes. This its not expected for awhile.

While it might sound a like a good idea of multi-type value objects as a short-term solution. The actual better idea is implement single type value objects instead.

In this article I will show you a way to implement value objects that is future value class proof in that the accessory classes just get promoted to being used with the Dart val class and type when it appears.

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