flutter_service_bloc

Last updated:

0 purchases

flutter_service_bloc Image
flutter_service_bloc Images
Add to Cart

Description:

flutter service bloc

flutter_service_bloc #
Flutter package for service layer implement with bloc architecture
Usage #
Bloc #
For bloc usage please ref to service_bloc.
Listener #

Dialog

ServiceBlocListener<ProductCheckoutServiceBloc, ProductCheckoutServiceRequested, String>(
onLoading: (context, state, event) => showLoading(),
onResponded: (context, state, event) => hideLoading(),
onFailed: (context, state, event, error) => showErrorDialog(context, error),
),
copied to clipboard

Navigate

ServiceBlocListener<ProductCheckoutServiceBloc, ProductCheckoutServiceRequested, String>(
onSucceed: (context, state, event, data) => Navigator.of(context).pushNamed(<your route>),
),
copied to clipboard

Bloc communication

ServiceBlocListener<UserLogoutServiceBloc, UserLogoutServiceRequested, dynamic>(
onSucceed: (context, state, event, data) => context.read<UserCubit>().clearUserData(),
),
copied to clipboard
Builder #
ServiceBlocBuilder<OpenLibraryAuthorDetailServiceBloc, OpenLibraryAuthorDetailServiceRequested, OpenLibraryAuthorDetail>(
onLoading: (context, state, event) => // your loading widget,
onSucceed: (context, state, event, data) {
return // your success widget
},
onFailed: (context, state, event, error) => // your failure widget,
),
copied to clipboard
For more example detail, please check out example.
Maintainer #
Jack Liu

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.