add method

void add(
  1. IPattern<T> pattern,
  2. bool formatPredicate(
    1. dynamic arg
    )
)

Adds a component pattern to this builder.

  • pattern: The component pattern to use as part of the eventual composite pattern.
  • formatPredicate: A predicate to determine whether or not this pattern is suitable for formatting the given value.

Implementation

void add(IPattern<T> pattern, bool Function(dynamic arg) formatPredicate) {
  _patterns.add(Preconditions.checkNotNull(pattern, 'pattern'));
  _formatPredicates.add(Preconditions.checkNotNull(formatPredicate, 'formatPredicate'));
}