merge method

  1. @override
ContextVariantBuilder merge(
  1. covariant ContextVariantBuilder? other
)
override

Merges this object with other, returning a new object of type T.

Implementation

@override
ContextVariantBuilder merge(ContextVariantBuilder? other) {
  if (other == null) return this;
  if (other.variant != variant) {
    throw ArgumentError.value(other, 'variant is not the same');
  }

  return ContextVariantBuilder(mergeFn(other.fn), variant);
}