EvaluationContext class

Evaluation context with enhanced targeting capabilities

Constructors

EvaluationContext.new({required Map<String, dynamic> attributes, EvaluationContext? parent, List<TargetingRule> rules = const [], Duration cacheDuration = const Duration(minutes: 5)})
const

Properties

attributes Map<String, dynamic>
final
cacheDuration Duration
final
hashCode int
The hash code for this object.
no setterinherited
parent EvaluationContext?
final
rules List<TargetingRule>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createChild(Map<String, dynamic> childAttributes, {List<TargetingRule>? childRules, Duration? childCacheDuration}) EvaluationContext
Create a child context
evaluateRules() Future<bool>
Evaluate all targeting rules with caching
getAttribute(String key) → dynamic
Get an attribute value, checking parent context if not found
merge(EvaluationContext other) EvaluationContext
Create a new context by merging with another
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited