hooked_bloc
library
Functions
-
useActionListener<ACTION>(BlocActionMixin<ACTION, Object> actionMixin, OnActionCallback<ACTION> onAction, {ActionListenerCondition<ACTION>? actionWhen})
→ void
-
Calls callback function
onAction
each time, when new action is dispatched from BlocBase
with BlocActionMixin, ActionCubit or ActionBloc
-
useBloc<T extends BlocBase>({List keys = const <dynamic>[], bool closeOnDispose = true})
→ T
-
Provides BlocBase
-
useBlocBuilder<C extends BlocBase, S>(BlocBase<S> bloc, {BlocBuilderCondition<S>? buildWhen})
→ S
-
Returns current state of BlocBase class
-
useBlocComparativeBuilder<C extends BlocBase, S>(BlocBase<S> bloc, {required BlocComparativeBuilderCondition<S> buildWhen})
→ S
-
Returns current state of BlocBase class basing on state's comparison
-
useBlocComparativeListener<BLOC extends BlocBase<S>, S>(BLOC bloc, BlocComparativeListener<BLOC, S> listener, {required BlocComparativeListenerCondition<S> listenWhen})
→ void
-
-
useBlocFactory<T extends BlocBase, F extends BlocFactory<T>>({OnBlocCreated<F>? onBlocCreate, List keys = const <dynamic>[], bool closeOnDispose = true})
→ T
-
Creates BlocBase
-
useBlocListener<BLOC extends BlocBase<S>, S>(BLOC bloc, BlocListener<BLOC, S> listener, {BlocListenerCondition<S>? listenWhen})
→ void
-
Calls callback function
listener
each time when listenWhen
conditions are fulfilled