error method

void error(
  1. OnState<TS> onState,
  2. ValueConsumer<Object>? builder
)

Implementation

void error(OnState<TS> onState, ValueConsumer<Object>? builder) {
  if (builder != null) {
    _add(
      onState,
      (c, s) => builder(c, s.extractError()),
    );
  }
}