InlineContext<TBloc extends JuiceBloc<TState> , TState extends BlocState> class
Context provided to inline use case handlers.
Provides typed access to bloc state and a clean emit API:
handler: (ctx, event) async {
ctx.emit.update(
newState: ctx.state.copyWith(count: ctx.state.count + 1),
groups: {CounterGroups.counter},
);
}
Constructors
-
InlineContext({required TBloc bloc, required InlineEmitter<
TState> emit}) -
const
Properties
- bloc → TBloc
-
The bloc instance.
final
-
emit
→ InlineEmitter<
TState> -
Emitter for state changes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- oldState → TState
-
The previous state (typed).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → TState
-
The current state (typed).
no setter
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