asData property

AsyncData<T>? asData

Upcast AsyncValue into an AsyncData, or return null if the AsyncValue is in loading/error state.

Implementation

AsyncData<T>? get asData {
  return _map(
    data: (d) => d,
    error: (e) => null,
    loading: (l) => null,
  );
}