finishRefresh method

void finishRefresh(
  1. String result
)

Completes a refresh operation with the specified result

This method finishes the current pull-to-refresh operation and displays the appropriate indicator based on the result parameter.

@param result The result of the refresh operation, can be:

  • 'success': The refresh was successful (default)
  • 'fail': The refresh operation failed
  • 'noMore': There is no more data to refresh
  • Any other value: No specific result indicator is shown

Implementation

void finishRefresh(String result) {
  state?.refreshController.finishRefresh(_parseIndicatorResult(result));
  state?._isRefreshing = false;
}