valueOrNull property

T? get valueOrNull

Gets the value if in data state, null otherwise

Implementation

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