SmartPaginationReorderableListView<T>.withProvider constructor
SmartPaginationReorderableListView<T>.withProvider ({
- Key? key,
- required PaginationRequest request,
- required PaginationProvider<
T> provider, - required Widget itemBuilder(
- BuildContext context,
- List<
T> documents, - int index
- required void onReorder()?,
- double? heightOfInitialLoadingAndEmptyWidget,
- Widget onError(
- Exception exception
- void onReachedEnd(
- SmartPaginationLoaded<
T> loader
- SmartPaginationLoaded<
- void onLoaded(
- SmartPaginationLoaded<
T> loader
- SmartPaginationLoaded<
- Widget emptyWidget = const EmptyDisplay(),
- Widget loadingWidget = const InitialLoader(),
- Widget bottomLoader = const BottomLoader(),
- bool shrinkWrap = false,
- bool reverse = false,
- Axis scrollDirection = Axis.vertical,
- EdgeInsetsGeometry padding = const EdgeInsetsGeometry.all(0),
- ScrollPhysics? physics,
- ScrollController? scrollController,
- bool allowImplicitScrolling = false,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- Widget? header,
- SmartPaginationLoaded<
T> beforeBuild(- SmartPaginationLoaded<
T> state
- SmartPaginationLoaded<
- ListBuilder<
T> ? listBuilder, - double? cacheExtent,
- Widget? separator,
- double spacing = 4,
- Widget firstPageLoadingBuilder(
- BuildContext context
- Widget firstPageErrorBuilder(
- BuildContext context,
- Exception error,
- VoidCallback retry
- Widget firstPageEmptyBuilder(
- BuildContext context
- Widget loadMoreLoadingBuilder(
- BuildContext context
- Widget loadMoreErrorBuilder(
- BuildContext context,
- Exception error,
- VoidCallback retry
- Widget loadMoreNoMoreItemsBuilder(
- BuildContext context
- int invisibleItemsThreshold = 3,
- SmartPaginationRefreshedChangeListener? refreshListener,
- List<
SmartPaginationFilterChangeListener< ? filterListeners,T> > - OnInsertionCallback<
T> ? onInsertionCallback, - VoidCallback? onClear,
- Logger? logger,
- int maxPagesInMemory = 5,
- RetryConfig? retryConfig,
- Duration? dataAge,
Creates a SmartPaginationReorderableListView with a provider for data fetching.
The request, provider, and onReorder are required to configure pagination.
Use itemBuilder to define how each item should be rendered.
Each item must have a unique key for reordering to work correctly.
Implementation
SmartPaginationReorderableListView.withProvider({
super.key,
required super.request,
required super.provider,
required super.itemBuilder,
required super.onReorder,
super.heightOfInitialLoadingAndEmptyWidget,
super.onError,
super.onReachedEnd,
super.onLoaded,
super.emptyWidget,
super.loadingWidget,
super.bottomLoader,
super.shrinkWrap,
super.reverse,
super.scrollDirection,
super.padding,
super.physics,
super.scrollController,
super.allowImplicitScrolling,
super.keyboardDismissBehavior,
super.header,
super.footer,
super.beforeBuild,
super.listBuilder,
super.cacheExtent,
super.separator,
super.spacing,
super.firstPageLoadingBuilder,
super.firstPageErrorBuilder,
super.firstPageEmptyBuilder,
super.loadMoreLoadingBuilder,
super.loadMoreErrorBuilder,
super.loadMoreNoMoreItemsBuilder,
super.invisibleItemsThreshold,
super.refreshListener,
super.filterListeners,
super.onInsertionCallback,
super.onClear,
super.logger,
super.maxPagesInMemory,
super.retryConfig,
Duration? dataAge,
}) : super.reorderableListViewWithProvider();