FutureNullableOnErrorExtension<T extends Object> extension
Methods
-
nullOnError({FutureOr<void> onError(Object e, StackTrace s)?, FutureOr<void> onErrorOrNull(Object? e, StackTrace? s)?, AsyncExtensionErrorLogger? errorLogger, bool logError = true})
→ Future<T?>
-
Returns this Future value or
null
if it throws an error.
-
onComplete({required FutureOr<void> onSuccess(T? r), FutureOr<void> onError(Object e, StackTrace s)?, FutureOr<void> onErrorOrNull(Object? e, StackTrace? s)?, AsyncExtensionErrorLogger? errorLogger, bool logError = true})
→ Future<T?>
-
Calls
onSuccess
or onError
when this Future completes.
If onErrorOrNull
is defined, calls onErrorOrNull
if it completes
with null
or with an error.
-
onCompleteNotNull({required FutureOr<void> onSuccess(T r), required FutureOr<void> onErrorOrNull(Object? e, StackTrace? s), AsyncExtensionErrorLogger? errorLogger, bool logError = true})
→ Future<T?>
-
Calls
onSuccess
or onErrorOrNull
when this Future completes.
Calls onErrorOrNull
If it completes with null
or with an error.