Indicator class abstract
Refresh and loading indicator. Indicator configuration and widget builder.
- Implementers
Constructors
- Indicator({required double triggerOffset, required bool clamping, Duration processedDuration = const Duration(seconds: 1), bool safeArea = true, SpringDescription? spring, SpringDescription? horizontalSpring, SpringBuilder? readySpringBuilder, SpringBuilder? horizontalReadySpringBuilder, bool springRebound = true, FrictionFactor? frictionFactor, FrictionFactor? horizontalFrictionFactor, double? infiniteOffset, bool? hitOver, bool? infiniteHitOver, IndicatorPosition position = IndicatorPosition.above, double? secondaryTriggerOffset, bool hapticFeedback = false, double secondaryVelocity = kDefaultSecondaryVelocity, double? secondaryDimension, double secondaryCloseTriggerOffset = kDefaultSecondaryCloseTriggerOffset, bool notifyWhenInvisible = false, IndicatorStateListenable? listenable, bool triggerWhenReach = false, bool triggerWhenRelease = false, bool triggerWhenReleaseNoWait = false, double maxOverOffset = double.infinity})
-
const
Properties
- clamping → bool
-
Hold to keep the Scrollable from going out of bounds.
final
- frictionFactor → FrictionFactor?
-
Friction factor when list is out of bounds.
See BouncingScrollPhysics.frictionFactor.
final
- hapticFeedback → bool
-
Whether to enable haptic feedback.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hitOver → bool
-
Hit boundary over.
When the Scrollable scrolls by itself, is it out of bounds.
When clamping is false, it takes effect.
final
- horizontalFrictionFactor → FrictionFactor?
-
Horizontal friction factor when list is out of bounds.
See BouncingScrollPhysics.frictionFactor.
final
- horizontalReadySpringBuilder → SpringBuilder?
-
Horizontal spring effect when the mode is IndicatorMode.ready.
final
- horizontalSpring → SpringDescription?
-
Horizontal spring effect when scrollable goes back.
final
- infiniteHitOver → bool
-
Infinite scroll hits out of bounds.
When the Scrollable scrolls by itself,
whether the infinite scroll is out of bounds.
When clamping is false, it takes effect.
final
- infiniteOffset → double?
-
Infinite scroll trigger offset.
The relative offset of the Scrollable from the bounds (>= 0)
When null, no infinite scroll.
final
- listenable → IndicatorStateListenable?
-
Indicator state listenable.
Monitor state changes in real time.
final
- maxOverOffset → double
-
Maximum overscroll offset, will no longer scroll.
When double.infinity, no limit.
final
- notifyWhenInvisible → bool
-
Notify when invisible.
When IndicatorNotifier.offset < 0, scrolling will also trigger notification.
This might have extra performance overhead, but it's very useful when you need it.
final
- position → IndicatorPosition
-
The position of the indicator.
final
- processedDuration → Duration
-
Task completion delay.
IndicatorMode.processed duration of state.
final
- readySpringBuilder → SpringBuilder?
-
Spring effect when the mode is IndicatorMode.ready.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeArea → bool
-
Whether to calculate the safe area.
final
- secondaryCloseTriggerOffset → double
-
Secondary close trigger offset.
final
- secondaryDimension → double?
-
Dimension of the second floor.
The default value is ScrollMetrics.viewportDimension.
final
- secondaryTriggerOffset → double?
-
Trigger offset for secondary.
The indicator will expand and fill the scrollview area.
Will not trigger when null.
final
- secondaryVelocity → double
-
Secondary opening speed.
final
- spring → SpringDescription?
-
Spring effect when scrollable goes back.
final
- springRebound → bool
-
Whether the spring can rebound.
Only works with readySpringBuilder.
final
- triggerOffset → double
-
The offset of the trigger task.
final
- triggerWhenReach → bool
-
Trigger immediately when reaching the triggerOffset.
final
- triggerWhenRelease → bool
-
Over triggerOffset, the release triggers immediately.
final
- triggerWhenReleaseNoWait → bool
-
Over triggerOffset, the release triggers immediately.
No need to wait for task execution to complete,
generally used for non-asynchronous events
or external custom indicators.
final
Methods
-
build(
BuildContext context, IndicatorState state) → Widget - Build indicator widget.
-
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