updateListUI method

void updateListUI(
  1. bool more,
  2. List<M> value, {
  3. bool show = true,
})

Implementation

void updateListUI(bool more, List<M> value, {bool show = true}) {
  if (value.isNotEmpty) {
    if (!more) list.clear();
    list.addAll(value);
  }
  showEmptyWidget = list.isEmpty;
  if (mounted) {
    if (more) {
      _controller.finishLoad();
    } else {
      _controller.finishRefresh();
    }
    setState(() {});
  }
}