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
-
- Object
- BaseViewModelCubit<
SearchState> - SearchCubit
- Annotations
-
- @injectable
Constructors
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
errorwhich triggersonErrorwith an optional StackTrace.inherited -
close(
) β Future< void> -
Closes the instance.
This method should be called when the instance is no longer needed.
Once
closeis called, the instance can no longer be used.inherited -
emit(
SearchState state) β void -
Updates the
stateto the providedstate.emitdoes nothing if thestatebeing emitted is equal to the currentstate.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
erroroccurs and notifiesBlocObserver.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