turbo_response 1.0.0
turbo_response: ^1.0.0 copied to clipboard
A type-safe response wrapper for handling success and failure states with pattern matching and utility methods.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2025-01-06 #
Added #
- Type-safe response wrapper for success and failure states
- Pattern matching with
whenandmaybeWhenmethods - Transformation methods:
mapSuccess,mapFail, andandThen - Utility methods:
unwrap,unwrapOr, andensure - Static utility methods:
traverseandsequence - Support for async operations in
mapSuccessandandThen - Static
throwFailmethod for creating and throwing failures - Title and message support for empty responses
- Platform-agnostic support (works with pure Dart projects)
- Zero Flutter dependencies for Dart-only projects
- All features from previous versions (0.1.0 - 0.2.6)
Changed #
- Renamed internal classes for better code organization
- Updated method names for better clarity and consistency
- Enhanced documentation with clearer descriptions
- Improved parameter names in IDE tooltips
- Better empty response handling with descriptive information
- Enhanced documentation formatting
- Renamed
throwFailtothrowWhenFailfor better clarity - Moved Flutter to dev_dependencies for Dart compatibility