SearchCubit class ViewModels

πŸ” Search Cubit

Copyright (c) 2025, OSMEA Team https://github.com/masterfabric-mobile/osmea/tree/dev/packages/core

Cubit that manages search operations with MVVM pattern

Inheritance
Annotations
  • @injectable

Constructors

SearchCubit()

Properties

hashCode β†’ int
The hash code for this object.
no setterinherited
isClosed β†’ bool
Whether the bloc is closed.
no setterinherited
runtimeType β†’ Type
A representation of the runtime type of the object.
no setterinherited
state β†’ SearchState
The current state.
no setterinherited
stateCurrentValue ← SearchState
πŸ”„ Setter for updating the current state value.
no getterinherited
stream β†’ Stream<SearchState>
The current stream of states.
no setterinherited

Methods

addError(Object error, [StackTrace? stackTrace]) β†’ void
Reports an error which triggers onError with an optional StackTrace.
inherited
close() β†’ Future<void>
Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.
inherited
emit(SearchState state) β†’ void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
noSuchMethod(Invocation invocation) β†’ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<SearchState> change) β†’ void
πŸ“Š Override of the onChange method to provide custom state change handling.
inherited
onError(Object error, StackTrace stackTrace) β†’ void
Called whenever an error occurs and notifies BlocObserver.onError.
inherited
performSearch(String query) β†’ Future<void>
stateChanger(SearchState state) β†’ void
πŸ”„ Method for changing the current state to a new value.
inherited
toString() β†’ String
A string representation of this object.
inherited
updateQuery(String query) β†’ void

Operators

operator ==(Object other) β†’ bool
The equality operator.
inherited