EasyRefreshController class

Controls a EasyRefresh widget. Control refresh, loading and indicator states.

Constructors

EasyRefreshController({bool controlFinishRefresh = false, bool controlFinishLoad = false})

Properties

controlFinishLoad bool
Take over the completion event of the load task. Finish the load with finishLoad and return the result.
final
controlFinishRefresh bool
Take over the completion event of the refresh task. Finish the refresh with finishRefresh and return the result.
final
footerState IndicatorState?
Get footer state.
no setter
hashCode int
The hash code for this object.
no setterinherited
headerState IndicatorState?
Get header state.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

callLoad({double? overOffset, Duration? duration = const Duration(milliseconds: 300), Curve curve = Curves.linear, ScrollController? scrollController, bool force = false}) Future
Automatically trigger load. overOffset Offset beyond the trigger offset, must be greater than 0. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo. scrollController When position is not ScrollPosition, you can use ScrollController. force Enforce execution even if the task is in progress. But you have to handle the completion event.
callRefresh({double? overOffset, Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear, ScrollController? scrollController, bool force = false}) Future
Automatically trigger refresh. overOffset Offset beyond the trigger offset, must be greater than 0. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo. scrollController When position is not ScrollPosition, you can use ScrollController. force Enforce execution even if the task is in progress. But you have to handle the completion event.
closeFooterSecondary({Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear}) Future
Close footer secondary. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo.
closeHeaderSecondary({Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear, ScrollController? scrollController}) Future
Close header secondary. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo. scrollController When position is not ScrollPosition, you can use ScrollController.
dispose() → void
Unbind.
finishLoad([IndicatorResult result = IndicatorResult.success, bool force = false]) → void
Finish the load task and return the result. result Result of task completion. force Enforced, used to modify the result.
finishRefresh([IndicatorResult result = IndicatorResult.success, bool force = false]) → void
Finish the refresh task and return the result. result Result of task completion. force Enforced, used to modify the result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openFooterSecondary({Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear}) Future
Open footer secondary. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo.
openHeaderSecondary({Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear, ScrollController? scrollController}) Future
Open header secondary. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo. scrollController When position is not ScrollPosition, you can use ScrollController.
resetFooter() → void
Reset Footer indicator state.
resetHeader() → void
Reset Header indicator state.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited