ListViewDetailModel constructor

ListViewDetailModel({
  1. @required List<RenderViewModel>? childrenList,
  2. double preloadSize = 0,
  3. required ScrollController controller,
  4. required NativeScrollGestureDispatcher scrollGestureDispatcher,
  5. required RefreshEventDispatcher refreshEventDispatcher,
  6. bool horizontal = false,
  7. bool bounces = true,
  8. bool hasStickyItem = false,
  9. ListPullHeaderViewModel? pullHeaderViewModel,
  10. ListPullFooterViewModel? pullFooterViewModel,
  11. List<ListItemViewModel> realItemList = const [],
  12. bool showScrollIndicator = false,
  13. bool hasRemovePreDraw = false,
  14. RefreshWrapperDelegate? delegate,
  15. double paddingTop = 0.0,
  16. double paddingRight = 0.0,
  17. double paddingBottom = 0.0,
  18. double paddingLeft = 0.0,
  19. List<List<RenderViewModel>>? stickyList,
})

Implementation

ListViewDetailModel({
  @required List<RenderViewModel>? childrenList,
  this.preloadSize = 0,
  required this.controller,
  required this.scrollGestureDispatcher,
  required this.refreshEventDispatcher,
  this.horizontal = false,
  this.bounces = true,
  this.hasStickyItem = false,
  this.pullHeaderViewModel,
  this.pullFooterViewModel,
  this.realItemList = const [],
  this.showScrollIndicator = false,
  this.hasRemovePreDraw = false,
  this.delegate,
  this.paddingTop = 0.0,
  this.paddingRight = 0.0,
  this.paddingBottom = 0.0,
  this.paddingLeft = 0.0,
  List<List<RenderViewModel>>? stickyList,
}) {
  if (childrenList != null) {
    children.addAll(childrenList);
  }
  if (stickyList != null && stickyList.isNotEmpty) {
    for (var element in stickyList) {
      if (element.isNotEmpty) {
        var elementList = <RenderViewModel>[];
        elementList.addAll(element);
        stickyChildList.add(elementList);
      }
    }
  }
}