catch_and_flow 0.1.0
catch_and_flow: ^0.1.0 copied to clipboard
A Flutter package for simplified and type-safe error handling in synchronous and asynchronous operations with a functional programming approach.
0.1.0 - 2025-06-21 #
Added #
- Initial release of the catch_and_flow package
- Core
CustomErrorclass withGenericErrorandErrorFromExceptionimplementations Resulttype for functional error handling with success/error pattern- Safety handlers for different operation types:
runSafetyFutureandrunSafetyFutureNullablefor async operationsrunSafetyStreamandrunSafetyStreamNullablefor reactive streamsrunSafetySyncandrunSafetySyncNullablefor synchronous operations
- Extension methods:
Future.when()for callback-based future handlingStream.when()for simplified stream subscription with callbacksResult.when()for functional pattern matching
- Configurable logging system with:
- Multiple log levels (debug, info, warning, error)
- Custom logger interface
- Helper functions for logging
- Complete API documentation with examples