resx 0.4.1 copy "resx: ^0.4.1" to clipboard
resx: ^0.4.1 copied to clipboard

Functional error handling for Dart: Result/Option/Validation + AsyncResult, Stream/Iterable utils, and tiny state Loadable.

Changelog #

0.4.0 #

Added

  • Added example code block to every public method across the library, including:
    • Core types: Result, Option, Validation, AsyncResult
      • Utilities: Results/Options helpers, Iterable/Stream extensions
      • State: Loadable and LoadableController
  • Stream extensions and Loadable APIs now include inline examples.

Changed

  • Polish English/Chinese README again with clarifications and emoji.
  • Bumped version to 0.4.0.

0.3.0 #

Added

  • Universal conversions: value.ok<E>(), value.some(), and 'e'.err<T>() for instant wrapping into Result/Option.
  • Kotlin/Rust-style ergonomic aliases:
    • Result: getOrNull(), getOrDefault(value), getOrElse(fn).
      • Option: okOr(error), okOrElse(fn), orNull(), unwrapOr(value), unwrapOrElse(fn).

Changed

  • Docs mention universal conversions and aliases. Version bump to 0.3.0.

0.2.0 #

Added

  • Result: ensure/ensureElse to guard Ok values; swap to invert Ok/Err.
  • Results: sequence and partition utilities.
  • AsyncResult: ensure; AsyncResults.sequence/partition.
  • Stream extensions: toResultStream and collectToResult.
  • Tiny state management: Loadable (Loading/Data/Error) and LoadableController.

Changed

  • Public library now exports stream_extensions.dart and loadable.dart.
  • README (EN/ZH) refreshed with new APIs and examples.

Fixed

  • Minor doc comments and tests coverage; added tests for all new APIs.

0.1.0 #

Initial release

  • Result with core ops (ok, err, map, flatMap, fold) and utilities (Results.combine, Results.traverse).
  • Option with some/none, map/flatMap/fold and utilities.
  • Validation with error accumulation and built-in validators.
  • AsyncResult (Future of Result) with async chaining; AsyncResults utilities.
  • Extensions for String/List/Map/Future/num/bool.
1
likes
145
points
193
downloads

Publisher

verified publisherfluttercandies.com

Weekly Downloads

Functional error handling for Dart: Result/Option/Validation + AsyncResult, Stream/Iterable utils, and tiny state Loadable.

Repository (GitHub)
View/report issues

Topics

#result #option #validation #functional-programming #error-handling

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

meta

More

Packages that depend on resx