valuePathToRootWith method
Same as valuePathToRoot, but with additional head
and tail
.
Implementation
List<T> valuePathToRootWith({Iterable<T>? head, Iterable<T>? tail}) {
final valuePathToRoot = this.valuePathToRoot;
if (head != null || tail != null) {
return [...?head, ...valuePathToRoot, ...?tail];
} else {
return valuePathToRoot;
}
}