result_library 1.1.0 copy "result_library: ^1.1.0" to clipboard
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> and Err<T, E> for representing successful and failed results.
  • Included a ResultBuilder class for creating Result instances conveniently.
  • Provided comprehensive documentation and examples in the README.md.

Fixed #

  • Resolved typos and formatting issues in the pubspec.yaml file.
  • 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 author field from the pubspec.yaml file.

1.1.0 - 2025-10-18 #

Added #

  • Added when({ok, err}) method for pattern matching on Result.
  • Added fold<R>({ok, err}) method to asynchronously fold into a Future<R>.
  • Added map<RT>(mapper) method to transform Ok values while preserving error type.

Changed #

  • Updated README.md with examples and API docs for when, fold, and map.
  • Corrected examples to use err() instead of error() to match the API.

[Unreleased] #

  • No unreleased changes at this time.
0
likes
140
points
12
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A robust Result type implementation for handling success and error states in Flutter and Dart applications.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on result_library