leak method
This method is used to change the state of the Drip Is important to use this method inside of drip and not outside
Implementation
// ?? is necessary avoid leak a newState method when the newState is the same that the current?
@protected
@override
void leak(DState newState) {
if (_stateController.isClosed) {
debugPrint('Drip: emit() called after was closed');
return;
}
_setState(newState);
dispatch(GenericStateChangeAction(newState));
}