onChange<T> method
Called whenever a Shard's state changes.
shard is the shard instance that changed.
previousState is the state before the change.
currentState is the state after the change.
Implementation
@override
void onChange<T>(Shard<T> shard, T previousState, T currentState) {
_changes.add(ObservedChange<T>(shard, previousState, currentState));
}