Hi, In the case of DefaultButtonElevation class, since equals is not overridden, false is returned even if two same instances are compared. But the DefaultButtonElevation class has @Stable annotation. why? According to the official documentation, stable should always return true when comparing the same two instances, so I think that equals needs to be overridden in order for DefaultButtonElevation to be stable.
👀 1
a
Albert Chang
08/13/2022, 4:56 PM
The result of equals for two instances will forever be the same for the same two instances.
This just means the equality shouldn't change. Two instances of
DefaultButtonElevation
class are unequal from the beginning, and will never become equal, so they are not breaking this .