You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dart_mappable copyWith generated methods can be used as clone tools but because of the overidding of the == operator, such a clone is recognized as equal to the original object when compared with the == operator. Only the identical() method detects the clone and the original as diferent objects.
I believe it would be helpful to users to include a section on the copyWith dart_mappable doc page explaing that. I suggest something like:
Clone
copyWith can be used as a clone tool when called without any parameters but be aware that the overriden == operator will detect the clone and the original as the same object. Only the identical() method detects that they are diferent objects.
dart_mappable copyWith generated methods can be used as clone tools but because of the overidding of the == operator, such a clone is recognized as equal to the original object when compared with the == operator. Only the identical() method detects the clone and the original as diferent objects.
I believe it would be helpful to users to include a section on the copyWith dart_mappable doc page explaing that. I suggest something like:
Clone
copyWith can be used as a clone tool when called without any parameters but be aware that the overriden == operator will detect the clone and the original as the same object. Only the identical() method detects that they are diferent objects.
Example:
The text was updated successfully, but these errors were encountered: