getListViewBuilder method

Widget getListViewBuilder({
  1. Widget? otherView,
})

Implementation

Widget getListViewBuilder({Widget? otherView}){
  final builder = otherView ?? getListView(items.length);
  final parent = getParentList(items.length, builder);
  Widget content;
  if(widget.enableSwipeRefresh == true){
    logNUI("NUIListInterface", "Swipe refresh enabled, wrapping list in refresh configuration, is enabled : ${!curModel.isLoading()}");
    content = RefreshConfiguration(
      headerTriggerDistance: 100,
      child: SmartRefresher(
        enablePullDown: !curModel.isLoading(),
        header: NUISwipeRefreshHeader(
          height: 100,
        ),
        controller: refreshController(),
        onRefresh: onSwipeRefresh,
        child: parent ?? builder,
      ),
    );
  }
  else{
    logNUI("NUIListInterface", "Swipe refresh disabled");
    content = parent ?? builder;
  }

  if(toUseShade != null && toUseShade != NUIShaderMaskType.NONE){
    return NUIShaderMask(child: content, shaderType: toUseShade);
  }

  return content;
}