resilify 1.0.0 copy "resilify: ^1.0.0" to clipboard
resilify: ^1.0.0 copied to clipboard

Unified Result-based API handling for Dart & Flutter — works with http, Dio, Retrofit, Chopper, and WebSocket. No exceptions. Just results.

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 #

Added #

  • Core

    • Sealed Result<T> with Success<T> and Error<T> variants (Dart 3).
    • Structured Failure value type with named constructors: network, timeout, badResponse, parsing, unauthorized, notFound, serverError, cancelled, unknown.
    • Synchronous extensions: isSuccess, isError, dataOrNull, errorOrNull, getOrElse, getOrThrow, onSuccess, onError.
    • when, fold, map, flatMap on Result<T>.
    • Async helpers on Future<Result<T>>: mapAsync, flatMapAsync, recover.
    • Stream helpers on Stream<Result<T>>: mapStream, whereSuccess, whereError, dataStream, listenResult.
    • List helpers on Result<List<T>>: mapList, filter, whereResult, firstOrError.
    • RetryHelper.retry with exponential backoff, predicate-based retry, and per-attempt observer.
  • Integrations (each opt-in via its own barrel file)

    • resilify_http.dartHttpResultHandler for package:http.
    • resilify_dio.dartDioResultHandler (incl. upload / download with progress) and ResultLoggerInterceptor.
    • resilify_retrofit.dart.toResult() on Retrofit-generated futures.
    • resilify_chopper.dart.toResult() on Chopper Response<T> futures with pluggable failure mappers.
    • resilify_websocket.dartWebSocketResultHandler<T> with auto-reconnect and exponential backoff.
1
likes
0
points
524
downloads

Publisher

verified publisherhimanshulahoti.is-a.dev

Weekly Downloads

Unified Result-based API handling for Dart & Flutter — works with http, Dio, Retrofit, Chopper, and WebSocket. No exceptions. Just results.

Repository (GitHub)
View/report issues

Topics

#result #error-handling #dio #http #websocket

License

unknown (license)

Dependencies

chopper, dio, http, retrofit, web_socket_channel

More

Packages that depend on resilify