valueOrNull property

T? get valueOrNull

Returns the value if successful, otherwise null.

Implementation

T? get valueOrNull => switch (this) {
      LxSuccess<T>(:final value) => value,
      _ => null,
    };