SmartPaginationColumn<T>.withCubit constructor
SmartPaginationColumn<T>.withCubit ({
- Key? key,
- required SmartPaginationCubit<
T> cubit, - required Widget itemBuilder(
- BuildContext context,
- List<
T> documents, - int index
- 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(),
- Widget? header,
- SmartPaginationLoaded<
T> beforeBuild(- SmartPaginationLoaded<
T> state
- SmartPaginationLoaded<
- ListBuilder<
T> ? listBuilder, - EdgeInsetsGeometry padding = const EdgeInsetsGeometry.all(0),
- bool allowImplicitScrolling = false,
- ScrollController? scrollController,
- 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> >
Creates a SmartPaginationColumn with an external cubit.
Use this constructor when you want to manage the cubit externally, such as when using it as a global variable or sharing it across screens.
Implementation
SmartPaginationColumn.withCubit({
super.key,
required super.cubit,
required super.itemBuilder,
super.heightOfInitialLoadingAndEmptyWidget,
super.onError,
super.onReachedEnd,
super.onLoaded,
super.emptyWidget,
super.loadingWidget,
super.bottomLoader,
super.header,
super.footer,
super.beforeBuild,
super.listBuilder,
super.padding,
super.allowImplicitScrolling,
super.scrollController,
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.columnWithCubit();