errorOrNull property

Object? get errorOrNull

Returns the error if the status is LxError, otherwise null.

Implementation

Object? get errorOrNull => switch (this) {
      LxError<T>(:final error) => error,
      _ => null,
    };