Flutter Custom Refresh Indicator

This package adds CustomRefreshIndicator widget that make it easy to implement custom refresh indicator.

Examples:

Use of SimpleIndicatorContainer with Icon as child LINK

simple_indicator

Envelope indicator

letter_indicator

Blur indicator

blur_indicator

Getting started

CustomRefreshIndicator

CustomRefreshIndicator is not the same as theRefreshIndicator widget. It has an absolute minimum functionality that allows you to create and set your own custom indicators.

Arguments

Argumenttypedefault valuerequired
childWidget---true
onRefreshFuture<void> Function()---true
indicatorBuilderWidget Function(BuildContext, CustomRefreshIndicatorData)---true
dragingToIdleDurationDurationDuration(milliseconds: 300)false
armedToLoadingDurationDurationDuration(milliseconds: 200)false
loadingToIdleDurationDurationDuration(milliseconds: 100)false
leadingGlowVisibleboolfalsefalse
trailingGlowVisiblebooltruefalse

CustomRefreshIndicatorData

Object containig data provided by CustomRefreshIndicator.

Props

| :--- | :--- | | value | double |
| direction | AxisDirection |
| scrollingDirection | ScrollDirection |
| indicatorState | CustomRefreshIndicatorState |

CustomRefreshIndicatorState

Enum which describes state of CustomRefreshIndicator.

Props

| value | description |
| :--- | :--- |
| idle | Indicator is idle |
| draging | user is draging indicator |
| armed | Indicator is dragged enough to be trigger onRefresh action |
| hiding | hiding indicator when onRefresh action is done or indicator was canceled |
| loading | onRefresh action is pending |

Libraries

custom_refresh_indicator