SmartPaginationListView<T>.withCubit constructor
SmartPaginationListView<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(),
- 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> >
Creates a SmartPaginationListView 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
SmartPaginationListView.withCubit({
super.key,
required super.cubit,
required super.itemBuilder,
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.listViewWithCubit();