setRuleContexts method

AlgoliaQuery setRuleContexts(
  1. List<String> value
)

RuleContexts

Enables contextual rules.

Provides a list of contexts for which rules are enabled. Contextual rules matching any of these contexts are activated, as well as generic rules.

Usage notes:

  • When empty, only generic rules are activated.
  • For performance reasons, you may pass up to 10 different contexts to the API at a time at query time.

Source: Learn more

Implementation

AlgoliaQuery setRuleContexts(List<String> value) {
  assert(value.isNotEmpty, 'value can not be empty');
  assert(!_parameters.containsKey('ruleContexts'));
  return _copyWithParameters(<String, dynamic>{'ruleContexts': value});
}