result_controller 1.3.0 copy "result_controller: ^1.3.0" to clipboard
result_controller: ^1.3.0 copied to clipboard

Functional error handling with Result pattern. Safely manage operations that can fail, with clean, type-safe error control.

Changelog #

1.3.0 #

Updates #

  • Updated to Dart 3.9.0
  • Removed unused static methods for better API simplicity
  • Improved documentation and examples
  • Code cleanup and optimization
  • Enhanced type safety with latest Dart features

Breaking Changes #

  • Removed several unused static methods to streamline the API
  • Cleaned up internal implementation for better performance

Developer Experience #

  • Better IntelliSense support with improved documentation
  • Cleaner API surface with focused functionality
  • Updated examples to reflect current best practices

1.2.0 #

  • Removed HttpMessage, now just use ApiErr, contain title an msm
  • Some logic update.

1.1.0 #

Breaking Changes #

  • Headers are now mandatory in ok and err constructors
  • Removed default constructor that allowed optional headers
  • Added status code validation (must be between 100 and 599)
  • Improved exception logging system in ApiErr
  • Added support for custom exception mapping
  • Modified whenList behavior to handle mixed types
  • Added whenListType method for better list typing
  • Improved null value handling in lists
  • Added whenJsonListMap method for processing dynamic JSON map lists
  • Added extension methods for Future<Result>
  • Improved async operation support
  • Added error transformation utilities

Added #

  • Better type handling in async operations
  • Enhanced JSON processing support
  • Better error handling in chained operations
  • New data transformation utilities

Fixed #

  • Null headers handling
  • Status code validation
  • Mixed list processing

1.0.3 #

Refactor #

  • HttpError to HttpErr

1.0.2 #

Refactor #

  • Cleaning extensions in result.

Added #

  • More test cases.

1.0.1 #

Documentation #

  • Update readme

1.0.0 Initial Release #

Added #

  • Core Result<T, E> implementation
  • Ok and Err classes for result handling
  • ApiResult and ApiResponse for API-specific error management
  • Comprehensive error handling methods
    • when()
    • map()
    • flatMap()
    • mapError()
    • recover()
  • Async error handling methods
    • trySync()
    • tryAsync()
    • trySyncMap()
    • tryAsyncMap()
  • Extension methods for collection operations
  • JSON parsing utilities
  • Detailed error reporting with HttpMessage and ApiErr

Features #

  • Type-safe error handling
  • Functional programming approach
  • Flexible error transformation
  • Support for both synchronous and asynchronous operations
  • Comprehensive API response processing

0.1.0 Pre-release Development #

  • Initial project structure
  • Basic implementation of core components
  • Extensive test coverage
2
likes
160
points
415
downloads

Publisher

verified publisherjhonacode.com

Weekly Downloads

Functional error handling with Result pattern. Safely manage operations that can fail, with clean, type-safe error control.

Repository (GitHub)
View/report issues

Topics

#result #error-handling #functional-programming #state-management #dart

Documentation

API reference

License

MIT (license)

More

Packages that depend on result_controller