builder_state 0.0.8
builder_state: ^0.0.8 copied to clipboard
A simple and customizable Flutter package to easily handle different states (loading, success, error, no data) when working with asynchronous operations like FutureBuilder. Includes ready-to-use widge [...]
Changelog #
All notable changes to this project will be documented in this file.
0.0.8 #
0.0.7 #
0.0.5 #
Added #
- Introduced
SelectionBuilder<T, S>widget to simplify Bloc-based conditional rendering:- Accepts a
BlocBase<S>instance. - Uses
getSelectedcallback to extract a selected value of typeT?from the Bloc state. - If selected value is not null, renders
selectedBuilder(T). - If selected value is null, renders
unselectedBuilder(). - Promotes separation of concerns and adheres to the Single Responsibility Principle.
- Accepts a
0.0.4 #
Added #
- Introduced
FutureLoader<T>widget to simplifyFutureBuilderhandling with:- Customizable success state with data (
onSuccessHasData). - Optional handler for success state with no data (
onSuccessNoData). - Custom error state handling via
onErroror fallback toErrorMsgBuilder. - Custom waiting state handling via
onWaitingor fallback toLoadingScreen.
- Customizable success state with data (
- Support for optional titles:
noDataTitle,errorTitle, and waiting messagewaitingTxt.
This is the first stable version.
0.0.1 #
Initial Release #
- Added
FutureLoaderwidget for managing async data states (loading, success, error, and no data). - Added
LoadingScreenwidget to display a loading spinner or custom waiting text. - Added
NoItemScreenwidget to display a "No Item" message when no data is available. - Included default error and waiting handlers (
defaultOnErroranddefaultOnWaiting). - Provided customizations for error, loading, and no data states.
- Integrated with
state_msg_builderfor message rendering.
Features #
- Simplified async state management for Flutter applications.
- Flexible error handling with different error messages.
- Easy integration with
FutureBuilderto display different states.