overrideWith method
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.
If other is null then this instance is returned directly.
The isRoot value is overridden to the value from other.
Implementation
BuilderOptions overrideWith(BuilderOptions? other) {
// ignore: avoid_returning_this
if (other == null) return this;
return BuilderOptions(
{}
..addAll(config)
..addAll(other.config),
isRoot: other.isRoot,
);
}