passNewValue<R extends Object> method

Dependency<R> passNewValue<R extends Object>(
  1. Resolvable<R> newValue
)

Creates a new Dependency instance with a different value of type R, while retaining the existing metadata.

Implementation

Dependency<R> passNewValue<R extends Object>(Resolvable<R> newValue) {
  return Dependency<R>._internal(newValue, metadata: metadata);
}