For the moment, if we want to change some attributes of an Area, we need to create a new one using same id and configuring the attributes we want to change.
With a copyWith() method it would have been more elegant and less verbose I think, especially when we just want to change one value such as the flex or min soze for examples:
For the moment, if we want to change some attributes of an Area, we need to create a new one using same id and configuring the attributes we want to change.
In your example:
With a copyWith() method it would have been more elegant and less verbose I think, especially when we just want to change one value such as the flex or min soze for examples:
Or maybe simple setters would have been easier that having to recreate new areas?