data property

T? get data

Gets the data associated with the status if it is a success status.

Implementation

T? get data =>
    switch (this) { SuccessStatus<T> success => success.data, _ => null };