ModelListView<T>.grid constructor

const ModelListView<T>.grid({
  1. Key? key,
  2. required List<T> list,
  3. required Future<void> load(),
  4. required bool loadedAll,
  5. required ModelListViewBuilder<T> builder,
  6. Future<void> refresh()?,
  7. String? error,
  8. bool doNotLoadOnInit = false,
  9. ScrollController? scrollController,
  10. double treshold = 400,
  11. Widget errorBuilder(
    1. BuildContext context,
    2. String error
    )?,
  12. Widget? loadingWidget,
  13. Widget? noResultsWidget,
  14. Widget? bottomLoader,
  15. Widget? firstChild,
  16. bool reverse = false,
})

Implementation

const ModelListView.grid({
  Key? key,
  required this.list, required this.load, required this.loadedAll, required this.builder,
  this.refresh, this.error,
  this.doNotLoadOnInit = false,
  this.scrollController, this.treshold = 400, //più alto rispetto alla list perchè il bottom loader occupa una riga di altezza
  this.errorBuilder, this.loadingWidget, this.noResultsWidget, this.bottomLoader ,
  this.firstChild,
  this.reverse = false
}) :
  _sliver = false,
  _grid = true,
  super(key: key);