onResolve<R> method

FutureOr<void> onResolve<R>(
  1. void callback(
    1. T r
    )
)

Resolves this instance and calls callback. Returns void.

Implementation

FutureOr<void> onResolve<R>(void Function(T r) callback) {
  var self = this;

  if (self is Future<T>) {
    return self.then(callback);
  } else {
    callback(self);
  }
}