mergeRelationScopes method

RelationScope mergeRelationScopes(
  1. RelationScope newScope,
  2. RelationScope? oldScope
)

Merge relation scopes

Implementation

RelationScope mergeRelationScopes(
  RelationScope newScope,
  RelationScope? oldScope,
) {
  if (oldScope == null) return newScope;

  return (q) {
    final q1 = oldScope(q);
    return newScope(q1);
  };
}