DyListViewController<T> constructor

DyListViewController<T>({
  1. int pageStart = 0,
  2. ScrollController? scrollController,
  3. Axis direction = Axis.vertical,
  4. required void refreshStateParentWidget(),
  5. List<DyItemData<T>> filterListData(
    1. List<DyItemData<T>>
    )?,
  6. List<DyDataGroup> groupListData(
    1. List<DyItemData<T>>
    )?,
  7. required Future<List<DyItemData<T>>> fetchData(
    1. DyFetchParam,
    2. DyFetchCustomParam?
    ),
  8. bool isSameItemData(
    1. DyItemData<T>,
    2. T
    )?,
  9. DyFetchCustomParamConfig? customParamOnFetchConfig,
})

Implementation

DyListViewController({
  this.pageStart = 0,
  ScrollController? scrollController,
  this.direction = Axis.vertical,
  required this.refreshStateParentWidget,
  this.filterListData,
  this.groupListData,

  /// Future Function to fetch data
  required Future<List<DyItemData<T>>> Function(
          DyFetchParam, DyFetchCustomParam?)
      fetchData,
  this.isSameItemData,
  this.customParamOnFetchConfig,
})  : scroll = scrollController ?? ScrollController(),
      isScrollControllerOutside = scrollController != null {
  _fetchData = fetchData;
  if (pageStart != 0) page = pageStart;
}