operator == method
- Object other
override
Overriding the equality operator to compare RoverPhoto objects. This is used to check if a photo is already present in the list.
Implementation
@override
bool operator ==(Object other) {
// Equality check based on the image source URL
return other is RoverPhoto && imgSrc == other.imgSrc;
}