service_bloc library
Classes
-
CursorBasedPagination<
ResponseData> - Cursor based pagination class implemented with delegate class style. CursorBasedPagination handles all cursor based page modification.
-
NumberBasedPagination<
ResponseData> - Number based pagination class implemented with delegate class style. NumberBasedPagination handles all number based page modification.
-
Pagination<
PageType, ResponseData> - Base pagination class implemented with delegate class style. Pagination handles all page modification.
-
PaginationListResponseData<
ResponseData> - List pagination response data holder and processor. PaginationListResponseData handles storing list response data and process list response data.
-
PaginationObjectResponseData<
ResponseData> - Object pagination response data holder and processor. PaginationObjectResponseData handles storing object response data and process object response data.
-
PaginationResponseData<
ResponseData> - Base pagination response data holder and processor. PaginationResponseData handles storing data and process data.
-
PaginationServiceBloc<
PaginationServiceRequestedEvent extends PaginationServiceRequested, ResponseData, PageType> - Base class for pagination service implement with bloc architecture.
- PaginationServiceRequested
- Base event for PaginationServiceBloc. Every event which is used in PaginationServiceBloc and including extended PaginationServiceBloc class must use this class as base event class.
-
ServiceBloc<
ServiceRequestedEvent extends ServiceRequested, ResponseData> - Base class for service calling implement with bloc architecture.
- ServiceEvent
- Base event for ServiceBloc. Every event which is used in ServiceBloc and including extended ServiceBloc class must use this class as base event class.
- ServiceInitial
- Initial state when ServiceBloc created by constructor. Default initial state of ServiceBloc should be only appear once.
-
ServiceLoadFailure<
ServiceRequestedEvent extends ServiceRequested> - Failure response state when ServiceBloc processed event with error. This state can be used for displaying error dialog with custom view.
-
ServiceLoadInProgress<
ServiceRequestedEvent extends ServiceRequested> - Processing state when ServiceBloc is handling event. This state can be used for displaying loading on screen.
-
ServiceLoadSuccess<
ServiceRequestedEvent extends ServiceRequested, ResponseData> - Success response state when ServiceBloc processed event without error. This state can be used for displaying data with custom view.
- ServiceRequested
- Base request event for ServiceBloc. Every request event which is used in ServiceBloc and including extended ServiceBloc class must use this class as base request event class.
-
ServiceResponseState<
ServiceRequestedEvent extends ServiceRequested> - Base response state for ServiceBloc. Every response state which is used in ServiceBloc and including extended ServiceBloc class must use this class as base response state class.
- ServiceState
- Base state for ServiceBloc. Every state which is used in ServiceBloc and including extended ServiceBloc class must use this class as base state class.
Mixins
- PaginationReload
- mixin class for only PaginationServiceRequested which allows PaginationServiceRequested having a reload action before service request.
Typedefs
-
PageIncrement<
PageType, ResponseData> = PageType Function(PageType previousPage, ResponseData responseData) - Type define function for increase page.
-
PageReset<
PageType> = PageType Function() - Type define function for rest page.
-
PageUpdateHasNextPage<
ResponseData> = bool Function(ResponseData responseData) - Type define function for update has next page boolean.
-
PaginationResponseDataMigration<
ResponseData> = FutureOr< ResponseData> Function(ResponseData previousResponseData, ResponseData responseData) - Type define function for migrate pagination response data.
-
PaginationResponseDataReset<
ResponseData> = FutureOr< ResponseData> Function() - Type define function for reset pagination response data.