Conditional class

Defines a condition for field visibility or behavior based on another field's value.

Constructors

Conditional({required String dependsOnKey, required List equals, bool invert = false})
Creates a new Conditional instance.
const

Properties

dependsOnKey String
The key of the field that this condition depends on.
final
equals List
The list of values that, if matched by the target field, will satisfy the condition.
final
hashCode int
The hash code for this object.
no setterinherited
invert bool
If true, the condition is satisfied when the target field's value is NOT in the equals list.
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>
Converts this Conditional instance to a JSON map.
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) Conditional
Creates a Conditional instance from a JSON map.