EnListView<T> constructor
EnListView<T> ({
- List<
T> ? items, - Widget itemView()?,
- Widget? lastItemView()?,
- FutureOr<
void> onLoadMore()?, - Future<
void> onRefresh()?, - NullableIndexedWidgetBuilder? itemBuilder,
- int? itemCount,
- IndexedWidgetBuilder? separatorBuilder,
- bool separator = true,
- double separatorIndentStart = 0,
- double separatorIndentEnd = 0,
- ScrollController? controller,
- bool? primary,
- ScrollPhysics? physics = const AlwaysScrollableScrollPhysics(),
- bool shrinkWrap = true,
- EdgeInsetsGeometry? padding,
- double? itemExtent,
- double? itemExtentBuilder()?,
- Widget? prototypeItem,
- int? findChildIndexCallback()?,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- bool addSemanticIndexes = true,
- double? cacheExtent,
- int? semanticChildCount,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- String? restorationId,
- Key? key,
Implementation
EnListView({
this.items,
this.itemView,
this.lastItemView,
this.onLoadMore,
this.onRefresh,
this.itemBuilder,
this.itemCount,
IndexedWidgetBuilder? separatorBuilder,
bool separator = true,
double separatorIndentStart = 0,
double separatorIndentEnd = 0,
ScrollController? controller,
this.primary,
this.physics = const AlwaysScrollableScrollPhysics(),
this.shrinkWrap = true,
this.padding,
this.itemExtent,
this.itemExtentBuilder,
this.prototypeItem,
this.findChildIndexCallback,
this.addAutomaticKeepAlives = true,
this.addRepaintBoundaries = true,
this.addSemanticIndexes = true,
this.cacheExtent,
this.semanticChildCount,
this.dragStartBehavior = DragStartBehavior.start,
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
this.restorationId,
super.key,
}) : this.controller = controller ?? ScrollController(),
this.separatorBuilder = _makeSepBuilder(separatorBuilder, separator, separatorIndentStart, separatorIndentEnd),
super() {
if (onLoadMore != null) {
this.controller.addListener(_checkScrollBottom);
}
}