PagedValue<Key, Value> class

Paged value that can be used with PagedValueNotifier.

Annotations
  • @freezed

Constructors

PagedValue({required List<Value> items, Key? nextPageKey, StreamChatError? error})
Represents the success state of the PagedValue
const
factory
PagedValue.error(StreamChatError error)
Represents the error state of the PagedValue.
const
factory
PagedValue.loading()
Represents the loading state of the PagedValue.
const
factory

Properties

asSuccess → Success<Key, Value>
Returns the PagedValue as Success.
no setter
hasError bool
Returns true if the PagedValue is Success and has an error.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasNextPage bool
Returns true if the PagedValue is Success and has more items to load.
no setter
isNotSuccess bool
Returns true if the PagedValue is not Success.
no setter
isSuccess bool
Returns true if the PagedValue is Success.
no setter
itemCount int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(Success<Key, Value> value), {required TResult loading(Loading<Key, Value> value), required TResult error(Error<Key, Value> value)}) → TResult
inherited
mapOrNull<TResult extends Object?>(TResult? $default(Success<Key, Value> value)?, {TResult? loading(Loading<Key, Value> value)?, TResult? error(Error<Key, Value> value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>(TResult $default(Success<Key, Value> value)?, {TResult loading(Loading<Key, Value> value)?, TResult error(Error<Key, Value> value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>(TResult $default(List<Value> items, Key? nextPageKey, StreamChatError? error)?, {TResult loading()?, TResult error(StreamChatError error)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(List<Value> items, Key? nextPageKey, StreamChatError? error), {required TResult loading(), required TResult error(StreamChatError error)}) → TResult
inherited
whenOrNull<TResult extends Object?>(TResult? $default(List<Value> items, Key? nextPageKey, StreamChatError? error)?, {TResult? loading()?, TResult? error(StreamChatError error)?}) → TResult?
inherited

Operators

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