itemBuilder method

Widget itemBuilder(
  1. BuildContext context,
  2. int index
)

do not override

Implementation

Widget itemBuilder(BuildContext context, int index) {
  if (kDebugMode && index >= itemCount) {
    return const SizedBox();
  }
  int headerLength = _headers.length;
  int footerIndex = itemCount - _footers.length;
  if (index < headerLength) {
    return _headers[index];
  } else if (index >= footerIndex) {
    index = index - footerIndex;
    return _footers[index];
  } else {
    if (items.isEmpty) {
      return buildEmptyView(mEmptyConfig);
    } else {
      index = index - headerLength;
      return buildListItem(context, getItem(index), index);
    }
  }
}