FutureOrExt<T> extension
Convenience methods for inspecting and converting a FutureOr.
- on
-
- FutureOr<
T>
- FutureOr<
Properties
- isFuture → bool
-
Available on FutureOr<
Returns true if this is a Future.T> , provided by the FutureOrExt extensionno setter - isNotFuture → bool
-
Available on FutureOr<
Returns true if this is not a Future.T> , provided by the FutureOrExt extensionno setter
Methods
-
asFutureOrNull(
) → Future< T> ? -
Available on FutureOr<
Returns this as a Future, orT> , provided by the FutureOrExt extensionnull
if it's a synchronous value. -
asNonFutureOrNull(
) → T? -
Available on FutureOr<
Returns the synchronous value, orT> , provided by the FutureOrExt extensionnull
if this is a Future. -
toFuture(
) → Future< T> -
Available on FutureOr<
Returns a Future, wrapping the value if it's not already one.T> , provided by the FutureOrExt extension -
withMinDuration(
Duration? duration) → FutureOr< T> -
Available on FutureOr<
Ensures that resolving this value takes at least a specifiedT> , provided by the FutureOrExt extensionduration
.