onError property
A list of fallback mutations you want to send to as Error events
You're basically emitting state with errors, just a little quicker utilizing the same action
void reducer(mutation){
updateStateWithError(mutation);
}
Feel free to pass any object you want, error and data state are maintained seperately so you can emit errors anytime without worrying about losing your data
Implementation
final List<Mutation>? Function(Object error)? onError;