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
-
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.
overOffsetOffset beyond the trigger offset, must be greater than 0.durationSee ScrollPosition.animateTo.curveSee ScrollPosition.animateTo.scrollControllerWhen position is not ScrollPosition, you can use ScrollController.forceEnforce 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.
overOffsetOffset beyond the trigger offset, must be greater than 0.durationSee ScrollPosition.animateTo.curveSee ScrollPosition.animateTo.scrollControllerWhen position is not ScrollPosition, you can use ScrollController.forceEnforce execution even if the task is in progress. But you have to handle the completion event. -
Close footer secondary.
durationSee ScrollPosition.animateTo.curveSee ScrollPosition.animateTo. -
closeHeaderSecondary(
{Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear, ScrollController? scrollController}) → Future -
Close header secondary.
durationSee ScrollPosition.animateTo.curveSee ScrollPosition.animateTo.scrollControllerWhen 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.
resultResult of task completion.forceEnforced, used to modify the result. -
finishRefresh(
[IndicatorResult result = IndicatorResult.success, bool force = false]) → void -
Finish the refresh task and return the result.
resultResult of task completion.forceEnforced, used to modify the result. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Open footer secondary.
durationSee ScrollPosition.animateTo.curveSee ScrollPosition.animateTo. -
openHeaderSecondary(
{Duration? duration = const Duration(milliseconds: 200), Curve curve = Curves.linear, ScrollController? scrollController}) → Future -
Open header secondary.
durationSee ScrollPosition.animateTo.curveSee ScrollPosition.animateTo.scrollControllerWhen position is not ScrollPosition, you can use ScrollController. - 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