AsyncLoading<ValueT> constructor

const AsyncLoading<ValueT>({
  1. num? progress,
})

Creates an AsyncValue in loading state.

Prefer always using this constructor with the const keyword.

Implementation

const AsyncLoading({num? progress})
  : _value = null,
    _loading = (progress: progress),
    _error = null,
    assert(
      progress == null || (progress >= 0 && progress <= 1),
      'progress must be between 0 and 1',
    ),
    super._();