error property

Object get error

Implementation

Object get error {
  if (isSuccess) throw StateError('Result is success');
  return _error!;
}