coffee_result 0.0.3 copy "coffee_result: ^0.0.3" to clipboard
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
  • Success and Failure implementations with a sealed Result contract
  • Core APIs:
    • fold
    • map
    • mapError
    • andThen / flatMap
    • recover / recoverWith
  • Explicit fail-fast accessors (value, error)
  • Result.guard and Result.guardAsync for containing exceptions at system boundaries
  • DX helpers via extensions:
    • valueOrNull
    • errorOrNull
    • getOrElse
    • tap / 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.

1
likes
160
points
145
downloads

Publisher

verified publisherwarmcoffee.nl

Weekly Downloads

Explicit and readable Result handling for Dart & Flutter. Model success and failure without exceptions, nulls, or deeply nested conditionals.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on coffee_result