getOrNull property

T? get getOrNull

Returns the value if Result is Success or null otherwise.

Implementation

T? get getOrNull => switch (this) {
  Success(value: final value) => value,
  _ => null,
};