resolveWithValue<V> method

FutureOr<V> resolveWithValue<V>(
  1. V value
)

Resolves this instance with value.

Implementation

FutureOr<V> resolveWithValue<V>(V value) {
  var self = this;

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