turbo_response 0.2.0
turbo_response: ^0.2.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.2.0 #
- BREAKING: Removed
extends Objectconstraint fromTurboResponseXextension to allow for more flexible type handling - Fixed issue with
isSuccessgetter not being accessible forTurboResponse<void>
0.1.0+1 #
- Updated repository URLs to point to the correct GitHub repository
- Fixed formatting issues in turbo_response.dart
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