swipeRefreshWidget method
Implementation
Widget swipeRefreshWidget(
BuildContext context, BlocxInfiniteListState state) {
if (!widget.isRefreshable || state.swipeRefreshHeight == 0) {
return SizedBox.square(dimension: 0);
}
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)),
),
);
}