FpEventTransformers class
Enterprise event transformers using RxDart for BLoC event streams.
Usage:
class SearchBloc extends BaseBloc<SearchEvent, SearchState> {
SearchBloc() : super(const SearchState()) {
on<SearchQueryChanged>(
_onQueryChanged,
transformer: FpEventTransformers.debounce(
const Duration(milliseconds: 300),
),
);
}
}
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
debounce<
E> (Duration duration) → EventTransformer< E> -
Debounce transformer — waits
durationof silence before processing the event. Useful for search fields to avoid rapid-fire API calls. -
restartable<
E> () → EventTransformer< E> - Restartable transformer — cancels the previous event handler on new event.
-
sequential<
E> () → EventTransformer< E> - Sequential transformer — processes events one at a time in order.
-
throttle<
E> (Duration duration) → EventTransformer< E> -
Throttle transformer — processes first event then ignores for
duration. Useful for button presses to prevent double-tap actions.