PagedValue<Key, Value> constructor

const PagedValue<Key, Value>({
  1. required List<Value> items,
  2. Key? nextPageKey,
  3. StreamChatError? error,
})

Represents the success state of the PagedValue

Implementation

// @Assert(
//   'nextPageKey != null',
//   'Cannot set an error if all the pages are already fetched',
// )
const factory PagedValue({
  /// List with all items loaded so far.
  required List<Value> items,

  /// The key for the next page to be fetched.
  Key? nextPageKey,

  /// The current error, if any.
  StreamChatError? error,
}) = Success<Key, Value>;