refreshViewBuilder method

dynamic refreshViewBuilder({
  1. required Widget? child,
  2. RefreshBuilder? refreshBuilder,
  3. Widget? onEmpty,
  4. OnError? onError,
  5. Widget? onLoading,
})

Implementation

refreshViewBuilder({
  required Widget? child,
  RefreshBuilder? refreshBuilder,
  Widget? onEmpty,
  OnError? onError,
  Widget? onLoading,
}) {
  final stateBuilder =
      controller.obx((state) => child!, onEmpty: onEmpty, onError: onError, onLoading: onLoading);
  if (refreshBuilder != null) {
    return refreshBuilder(stateBuilder);
  } else {
    return stateBuilder;
  }
}