swipeRefreshWidget method

Widget swipeRefreshWidget(
  1. BuildContext context,
  2. BlocxInfiniteListState state
)

Implementation

Widget swipeRefreshWidget(
    BuildContext context, BlocxInfiniteListState state) {
  final external =
      widget.refreshWidgetBuilder?.call(context, state.swipeRefreshHeight);
  if (external != null) return external;
  final primary = Theme.of(context).colorScheme.primary;
  return Container(
    color: primary,
    height: state.swipeRefreshHeight,
    child: const Center(
      child: SizedBox(
          width: 24,
          height: 24,
          child: CircularProgressIndicator(color: Colors.white)),
    ),
  );
}