turbo_response 0.1.0
turbo_response: ^0.1.0 copied to clipboard
A type-safe response handling library for Dart and Flutter, providing a sealed class hierarchy for handling success and failure states.
0.1.0 #
- Initial release
- Added
TurboResponsesealed class withSuccessandFailvariants - Added pattern matching support with
whenandmaybeWhen - Added convenience methods
whenSuccessandwhenFailfor single-state handling - Added functional transformations with
fold,mapSuccess, andmapFail - Added value extraction with
unwrap,unwrapOr, andunwrapOrCompute - Added error recovery with
recoverandandThen - Added property getters for
result,title,message, anderror - Added
throwFailmethod for Firestore transaction support - Added comprehensive test coverage
- Added improved debugging support with custom
toStringimplementation - Made
resultgetter non-nullable and throwTurboExceptionin fail state - Made
erroroptional inTurboExceptionwithhasError,hasTitle, andhasMessagegetters