IndicatorStateHelper class
Deprecated in favor of the CustomRefreshIndicator.onStateChanged function argument and IndicatorStateChange class.
CustomRefreshIndicator(
onStateChanged: (change) {
if (change.didChange(to: IndicatorState.loading)) {
_startShakeAnimation();
} else if (change.didChange(to: IndicatorState.idle)) {
_stopShakeAnimation();
}
},
child: child,
builder: (context, child, controller) {
/***/
},
);
- Annotations
-
- @Deprecated('Deprecated in favor of the CustomRefreshIndicator.onStateChanged function.')
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isArmed → bool
-
no setter
- isComplete → bool
-
no setter
- isDragging → bool
-
no setter
- isHiding → bool
-
no setter
- isIdle → bool
-
no setter
- isLoading → bool
-
no setter
- previousState → IndicatorState
-
Describes current CustomRefreshIndicator state
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → IndicatorState
-
Describes current CustomRefreshIndicator state
no setter
- wasArmed → bool
-
no setter
- wasComplete → bool
-
no setter
- wasDragging → bool
-
no setter
- wasHiding → bool
-
no setter
- wasIdle → bool
-
no setter
- wasLoading → bool
-
no setter
Methods
-
didStateChange(
{IndicatorState? from, IndicatorState? to}) → bool -
- When
from
andto
are provided - returnstrue
when state did changefrom
toto
.- When only
from
is provided - returnstrue
when state did change fromfrom
.- When only
to
is provided - returnstrue
when state did change toto
.- When
from
andto
equalsnull
- returnstrue
for any state change. - When
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
IndicatorState state) → void -
Updates
state
and previousState data.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited