QuantityConstraint class
Defines the quantity constraints for the number of widgets expected to be found.
This class specifies the minimum and maximum number of widgets that a selector should match, enabling precise control over the selection criteria.
Constructors
- QuantityConstraint({int? min, int? max})
-
Constructs a QuantityConstraint with optional minimum and maximum values.
const
- QuantityConstraint.atLeast(int n)
-
Constructs a QuantityConstraint where at least
n
widgets should match.const - QuantityConstraint.atMost(int n)
-
Constructs a QuantityConstraint where at most
n
widgets should match.const - QuantityConstraint.exactly(int n)
-
Constructs a QuantityConstraint where exactly
n
widgets should match.const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- max → int?
-
The maximum number of widgets that should match.
null
for no maximum.final - min → int?
-
The minimum number of widgets that should match.
null
for no minimum.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
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- single → const QuantityConstraint
- Represents a constraint where exactly one widget should match.
- unconstrained → const QuantityConstraint
- Represents an unconstrained quantity, allowing any number of widgets to match.
- zero → const QuantityConstraint
- Represents a constraint where no widgets should match.