whenComplete method

Future<V> whenComplete(
  1. FutureOr<void> action()
)

Registers a callback to be executed when resolution completes, regardless of success or failure.

Equivalent to calling resolveAsync and then invoking Future.whenComplete on the resulting Future.

Implementation

Future<V> whenComplete(FutureOr<void> Function() action) =>
    resolveAsync().whenComplete(action);