CounterActions class
Actions for manipulating a counter value.
This class provides methods to increment, decrement, set, and reset a counter value while respecting optional min/max constraints.
Constructors
- CounterActions(int getter(), void inc([int?]), void dec([int?]), void setter(int), void reset([int?]), int? _min(), int? _max())
- Creates a CounterActions instance with the provided functions.
Properties
- dec → void Function([int?])
-
Decrements the counter value.
final
- getter → int Function()
-
Function to get the current counter value.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inc → void Function([int?])
-
Increments the counter value.
final
- max → int?
-
The maximum value constraint, or null if no constraint is set.
no setter
- min → int?
-
The minimum value constraint, or null if no constraint is set.
no setter
- reset → void Function([int?])
-
Resets the counter to its initial value.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setter → void Function(int)
-
Sets the counter to a specific value.
final
- value → int
-
The current value of the counter.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited