result_library 1.1.0
result_library: ^1.1.0 copied to clipboard
A robust Result type implementation for handling success and error states in Flutter and Dart applications.
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 Initial Release (YYYY-MM-DD) #
Added #
- Introduced the
Result<T, E>class for handling success and error states. - Added utility classes
Ok<T, E>andErr<T, E>for representing successful and failed results. - Included a
ResultBuilderclass for creatingResultinstances conveniently. - Provided comprehensive documentation and examples in the
README.md.
Fixed #
- Resolved typos and formatting issues in the
pubspec.yamlfile. - Ensured compatibility with Dart SDK version
>=2.19.0 <4.0.0.
Changed #
- Updated the SDK constraint to explicitly reflect compatibility with Dart SDK
>=2.19.0 <4.0.0.
Removed #
- Removed the deprecated
authorfield from thepubspec.yamlfile.
1.1.0 - 2025-10-18 #
Added #
- Added
when({ok, err})method for pattern matching onResult. - Added
fold<R>({ok, err})method to asynchronously fold into aFuture<R>. - Added
map<RT>(mapper)method to transformOkvalues while preserving error type.
Changed #
- Updated
README.mdwith examples and API docs forwhen,fold, andmap. - Corrected examples to use
err()instead oferror()to match the API.
[Unreleased] #
- No unreleased changes at this time.