error method

void error([
  1. Exception? exception,
  2. T? data
])

Sets current state to error.

Implementation

void error([Exception? exception, T? data]) {
  value = EntityState<T>.error(exception, data);
}