addGlobalScopePattern method

void addGlobalScopePattern(
  1. String identifier,
  2. UntypedScope scope, {
  3. String pattern = '*',
})

Adds a global scope that applies to models matching a pattern.

Implementation

void addGlobalScopePattern(
  String identifier,
  UntypedScope scope, {
  String pattern = '*',
}) {
  if (identifier.trim().isEmpty) {
    throw ArgumentError.value(identifier, 'identifier', 'cannot be empty');
  }
  _patternGlobalScopes.add(
    _PatternGlobalScopeRegistration(
      identifier: identifier,
      pattern: pattern,
      scope: scope,
    ),
  );
}