overrideWith method

BuilderOptions overrideWith (
  1. BuilderOptions other

Returns a new set of options with keys from other overriding options in this instance.

Config values are overridden at a per-key granularity. There is no value level merging. other may be null, in which case this instance is returned directly.

The isRoot value will also be overridden to value from other.


BuilderOptions overrideWith(BuilderOptions other) {
  if (other == null) return this;
  return BuilderOptions({}..addAll(config)..addAll(other.config),
      isRoot: other.isRoot);