Rule constructor
Rule({})
Implementation
Rule({
/// Optional identifier that allows referencing this rule.
String? id,
/// Tags can be used to annotate rules and perform operations on sets of
/// rules.
List<String>? tags,
/// List of conditions that can trigger the actions.
required List<Object> conditions,
/// List of actions that are triggered if one of the conditions is
/// fulfilled.
required List<Object> actions,
/// Optional priority of this rule. Defaults to 100.
int? priority,
}) : _wrapped = $js.Rule(
id: id,
tags: tags?.toJSArray((e) => e),
conditions: conditions.toJSArray((e) => e.jsify()!),
actions: actions.toJSArray((e) => e.jsify()!),
priority: priority,
);