copyWith method
Dependency<T>
copyWith({
- Option<
Resolvable< value = const None(),T> > - Option<
DependencyMetadata> metadata = const None(),
Creates a new instance with updated fields, preserving the values of any fields not explicitly specified.
Implementation
Dependency<T> copyWith({
Option<Resolvable<T>> value = const None(),
Option<DependencyMetadata> metadata = const None(),
}) {
return Dependency<T>(
switch (value) {
Some(value: final v) => v,
None() => _value,
},
metadata: metadata,
);
}