InfiniteScrollState<T> class

Immutable state emitted by InfiniteScrollCubit.

Constructors

InfiniteScrollState({List<T> items = const [], int currentPage = 1, bool hasMore = true, bool isLoading = false, bool isLoadingMore = false, bool isRefreshing = false, Object? error, StackTrace? stackTrace})
Creates an infinite-scroll state snapshot.
const
InfiniteScrollState.initial()
Creates the default empty state ready to load page one.
factory

Properties

currentPage int
Most recently loaded page number.
final
error Object?
Most recent fetch error, if any.
final
hashCode int
The hash code for this object.
no setterinherited
hasMore bool
Whether another page may be requested.
final
isLoading bool
Whether the first page is loading.
final
isLoadingMore bool
Whether a subsequent page is loading.
final
isRefreshing bool
Whether a refresh is replacing current items.
final
items List<T>
All items loaded so far.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
Stack trace associated with error, if any.
final

Methods

copyWith({List<T>? items, int? currentPage, bool? hasMore, bool? isLoading, bool? isLoadingMore, bool? isRefreshing, Object? error, StackTrace? stackTrace}) InfiniteScrollState<T>
Returns a copy with the supplied fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited