dispose method
It's a clean up function.
Implementation
void dispose() {
_stateSubscriptions.forEach((key, value) {
value.cancel();
});
_effectSubscriptions.forEach((key, value) {
value.cancel();
});
_stateSubscriptions.clear();
_effectSubscriptions.clear();
_dispatcher?.close();
_store?.close();
_dispatcher = null;
_store = null;
}