Rule class final

A RawRule compiled for asking questions of.

Holds the matchers the raw rule cannot: compiling conditions is the expensive part, and a list screen asks the same rule once per row.

Constructors

Rule(RawRule origin, {required int priority, ConditionsMatcher? conditionsMatcher, FieldsMatcher fieldsMatcher = defaultFieldsMatcher, List<String> resolveActions(List<String>)?})
Compiles origin.

Properties

actions → List<String>
The actions, with any aliases already expanded.
final
condition → Condition?
Its conditions parsed, or null when it has none.
no setter
conditions → Map<String, Object?>?
Its conditions, unparsed.
no setter
fields → List<String>?
The fields it is limited to, or null for all of them.
no setter
hashCode → int
The hash code for this object.
no setterinherited
inverted → bool
Whether the rule forbids rather than permits.
no setter
origin → RawRule
The rule this was compiled from, unchanged.
final
priority → int
Where this rule sits against its siblings. Lower wins.
final
reason → String?
Why it forbids, if it says.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subjects → List<String>
The subject types this rule is about.
no setter

Methods

compileConditions() → void
Compiles this rule's conditions now, rather than on the first check that needs them.
matchesConditions(Object? subject) → bool
Whether subject satisfies this rule's conditions.
matchesField(String? field) → bool
Whether this rule covers field.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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