zeba_academy_result 0.0.1
zeba_academy_result: ^0.0.1 copied to clipboard
A lightweight type-safe Result type for representing success and failure in Dart and Flutter 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.
0.0.1 - 2026-08-12 #
Added #
- Added the initial release of
zeba_academy_result. - Added generic
Result<T, E>abstraction for representing operation outcomes. - Added
Success<T, E>for successful results. - Added
Failure<T, E>for failed results. - Added
isSuccessstate checking. - Added
isFailurestate checking. - Added
valueOrNullfor safe success-value access. - Added
errorOrNullfor safe failure-error access. - Added
map()for transforming successful values. - Added
mapError()for transforming failure errors. - Added
fold()for handling success and failure branches. - Added
when()for pattern-style result handling. - Added
getOrThrow()for retrieving successful values. - Added
getOrElse()for providing fallback values. - Added
getOrElseGet()for dynamically generating fallback values. - Added value-based equality for
SuccessandFailure. - Added descriptive
toString()implementations. - Added comprehensive unit tests covering success, failure, mapping, folding, fallbacks, equality, and error handling.
- Added public package exports through
zeba_academy_result.dart. - Added GPL-3.0 licensing.
- Added production-ready package documentation.
Compatibility #
- Requires Dart SDK
^3.12.0. - Compatible with Flutter applications.
- Compatible with pure Dart applications.
- No runtime dependencies.