ListViewDetailModel constructor
ListViewDetailModel({
- @required List<
RenderViewModel> ? childrenList, - double preloadSize = 0,
- required ScrollController controller,
- required NativeScrollGestureDispatcher scrollGestureDispatcher,
- required RefreshEventDispatcher refreshEventDispatcher,
- bool horizontal = false,
- bool bounces = true,
- bool hasStickyItem = false,
- ListPullHeaderViewModel? pullHeaderViewModel,
- List<
ListItemViewModel> realItemList = const [], - bool showScrollIndicator = false,
- bool hasRemovePreDraw = false,
- RefreshWrapperDelegate? delegate,
- double paddingTop = 0.0,
- double paddingRight = 0.0,
- double paddingBottom = 0.0,
- double paddingLeft = 0.0,
- List<
List< ? stickyList,RenderViewModel> >
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);
}
}
}
}