Rule constructor

Rule({
  1. required int id,
  2. int? priority,
  3. required RuleCondition condition,
  4. required RuleAction action,
})

Implementation

Rule({
  /// An id which uniquely identifies a rule. Mandatory and should be >= 1.
  required int id,

  /// Rule priority. Defaults to 1. When specified, should be >= 1.
  int? priority,

  /// The condition under which this rule is triggered.
  required RuleCondition condition,

  /// The action to take if this rule is matched.
  required RuleAction action,
}) : _wrapped = $js.Rule(
        id: id,
        priority: priority,
        condition: condition.toJS,
        action: action.toJS,
      );