SearchState class

Immutable state for the search BLoC

Constructors

SearchState({String searchText = '', Set<String> selectedFilters = const {}, List<SearchFilter> visibleFilters = const [], SearchStatus conversationsStatus = SearchStatus.initial, List<Conversation> conversations = const [], bool hasMoreConversations = false, SearchStatus messagesStatus = SearchStatus.initial, List<BaseMessage> messages = const [], bool hasMoreMessages = false, SearchScope scope = SearchScope.both, bool showConversations = true, bool showMessages = true, String? errorMessage})
const

Properties

allEmpty bool
no setter
allError bool
no setter
allLoading bool
no setter
bothActive bool
no setter
conversations List<Conversation>
final
conversationsStatus SearchStatus
final
errorMessage String?
final
hashCode int
The hash code for this object.
no setterinherited
hasMoreConversations bool
final
hasMoreMessages bool
final
isInitial bool
no setter
messages List<BaseMessage>
final
messagesStatus SearchStatus
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope SearchScope
final
searchText String
final
selectedFilters Set<String>
final
showConversations bool
final
showMessages bool
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
visibleFilters List<SearchFilter>
final

Methods

copyWith({String? searchText, Set<String>? selectedFilters, List<SearchFilter>? visibleFilters, SearchStatus? conversationsStatus, List<Conversation>? conversations, bool? hasMoreConversations, SearchStatus? messagesStatus, List<BaseMessage>? messages, bool? hasMoreMessages, SearchScope? scope, bool? showConversations, bool? showMessages, String? errorMessage, bool clearError = false}) SearchState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldShowNoResults() bool
Whether we should show the no-results screen
toString() String
A string representation of this object.
inherited

Operators

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