stateEqualityCheck method
A basic equality check that compares the current and next states using the ==
operator.
This method is used as a default equality check when no custom equality check is provided.
It checks if the current and next states are equal using the ==
operator and also considers
object identity using identical.
curr
is the current state.
next
is the next state to compare.
Returns true
if the states are equal, otherwise false
.
Implementation
@protected
bool stateEqualityCheck(S curr, S next) => curr == next;