zeba_academy_result 0.0.1 copy "zeba_academy_result: ^0.0.1" to clipboard
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 isSuccess state checking.
  • Added isFailure state checking.
  • Added valueOrNull for safe success-value access.
  • Added errorOrNull for 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 Success and Failure.
  • 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.
0
likes
150
points
56
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A lightweight type-safe Result type for representing success and failure in Dart and Flutter applications.

Homepage

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_result