asError property

AsyncError<T>? get asError

Returns this value as AsyncError if it holds an error, otherwise null.

Implementation

AsyncError<T>? get asError =>
    this is AsyncError<T> ? this as AsyncError<T> : null;