ConditionDefinition class

Represents a condition definition. A condition definition is a set of operands and an operator that can be used to evaluate a condition.

A condition definition has the following properties:

  • operator: The operator to be used to evaluate the condition.
  • operands: A list of operands to be used in the evaluation.

The operator property can be one of the following built-in operators or any user-defined operator:

  • ==: Equal to
  • !=: Not equal to
  • >: Greater than
  • >=: Greater than or equal to
  • <: Less than
  • <=: Less than or equal to
  • !: Negation of the operand
  • all: All operands must be true
  • any: Any operand must be true
  • none: None of the operands must be true
  • contains: The first operand must contain the second operand
  • startsWith: The first operand must start with the second operand
  • endsWith: The first operand must end with the second operand
  • matches: The first operand must match the regular expression in the second operand
  • expression: The first operand must evaluate to true using the expression in the second operand

Constructors

ConditionDefinition.new({required String operator, required List operands})

Properties

hashCode int
The hash code for this object.
no setterinherited
operands List
final
operator String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Creates a ConditionDefinition object from a JSON object.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) ConditionDefinition
Converts the ConditionDefinition object to a JSON object.