coffee_result 0.0.3
coffee_result: ^0.0.3 copied to clipboard
Explicit and readable Result handling for Dart & Flutter. Model success and failure without exceptions, nulls, or deeply nested conditionals.
Changelog #
0.0.1 #
Initial release.
Added #
- Core
Result<T, E>abstraction to explicitly model success and failure SuccessandFailureimplementations with a sealed Result contract- Core APIs:
foldmapmapErrorandThen/flatMaprecover/recoverWith
- Explicit fail-fast accessors (
value,error) Result.guardandResult.guardAsyncfor containing exceptions at system boundaries- DX helpers via extensions:
valueOrNullerrorOrNullgetOrElsetap/tapError
AsyncResult<T, E>typedef for cleaner async signatures- Example Flutter app demonstrating:
- boundary exception handling
- chaining without nested conditionals
- explicit success and failure flows
Notes #
This release focuses on clarity, explicit control flow, and production-minded defaults. The API surface is intentionally small and opinionated.
0.0.2 #
Updated the README.md.
0.0.3 #
Updated the README.md for readability.