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

IndicatorStateHelper()

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 and to are provided - returns true when state did change from to to.
  • When only from is provided - returns true when state did change from from.
  • When only to is provided - returns true when state did change to to.
  • When from and to equals null - returns true for any state change.
  • 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