setError method
Manually set error state with enhanced error info
Implementation
void setError(Object error, [StackTrace? stackTrace]) {
final rxError = error is RxException
? error
: RxException.withTimestamp(
'Manual error set',
originalError: error,
stackTrace: stackTrace,
);
value = AsyncSnapshot.withError(
ConnectionState.done,
rxError,
stackTrace ?? StackTrace.current,
);
}