loadMoreWidget method
Implementation
Widget loadMoreWidget(BuildContext context, InfiniteListState state) {
final external = widget.loadMoreWidgetBuilder?.call(context, state.isLoadingMore);
if (external != null) return external;
final scheme = Theme.of(context).colorScheme;
return AnimatedSize(
duration: const Duration(milliseconds: 300),
child: state.isLoadingMore
? Container(
padding: const EdgeInsets.all(16),
color: scheme.primary,
child: Center(
child: SizedBox(
height: 24,
width: 24,
child: CircularProgressIndicator(color: scheme.onPrimary),
),
),
)
: const SizedBox.shrink(),
);
}