builder method

Widget builder (
  1. BuildContext context,
  2. EasyRefresh easyRefresh,
  3. ValueNotifier<bool> focusNotifier,
  4. ValueNotifier<TaskState> taskNotifier,
  5. ValueNotifier<bool> callRefreshNotifier
)

Implementation

Widget builder(
    BuildContext context,
    EasyRefresh easyRefresh,
    ValueNotifier<bool> focusNotifier,
    ValueNotifier<TaskState> taskNotifier,
    ValueNotifier<bool> callRefreshNotifier) {
  return EasyRefreshSliverRefreshControl(
    refreshIndicatorExtent: extent,
    refreshTriggerPullDistance: triggerDistance,
    builder: contentBuilder,
    completeDuration: completeDuration,
    onRefresh: easyRefresh.onRefresh,
    focusNotifier: focusNotifier,
    taskNotifier: taskNotifier,
    callRefreshNotifier: callRefreshNotifier,
    taskIndependence: easyRefresh.taskIndependence,
    enableControlFinishRefresh: easyRefresh.enableControlFinishRefresh,
    enableInfiniteRefresh: enableInfiniteRefresh && !float,
    enableHapticFeedback: enableHapticFeedback,
    headerFloat: float,
    bindRefreshIndicator: (finishRefresh, resetRefreshState) {
      if (easyRefresh.controller != null) {
        easyRefresh.controller.finishRefreshCallBack = finishRefresh;
        easyRefresh.controller.resetRefreshStateCallBack = resetRefreshState;
      }
    },
  );
}