finishRefresh method

void finishRefresh([
  1. IndicatorResult result = IndicatorResult.success,
  2. bool force = false
])

Finish the refresh task and return the result. result Result of task completion. force Enforced, used to modify the result.

Implementation

void finishRefresh(
    [IndicatorResult result = IndicatorResult.success, bool force = false]) {
  assert(controlFinishRefresh || force,
      'Please set controlFinishRefresh to true, then use. If you want to modify the result, you can set force to true.');
  _state?._headerNotifier._finishTask(result);
}