async_error_boundary 0.1.0 copy "async_error_boundary: ^0.1.0" to clipboard
async_error_boundary: ^0.1.0 copied to clipboard

Declarative error boundary widget for Flutter inspired by React's Error Boundary. Catch errors thrown by descendants and render fallback UI with reset support.

0.1.0 #

Initial release.

Features #

  • ErrorBoundary widget that catches errors thrown during the build of its descendants and renders a builder(context, error, reset) fallback, inspired by React's Error Boundary.
  • onError callback for logging or reporting caught errors with the original stack trace.
  • onReset callback that fires when the boundary is reset, receiving an optional argument forwarded from the fallback's reset function.
  • resetKeys for automatic recovery: when any value in the list changes between rebuilds, the error state is cleared and onReset is invoked with null, mirroring react-error-boundary semantics.
  • ErrorBoundary.of(context) returns an ErrorBoundaryProvider exposing resetBoundary and showBoundary for imperative control from descendant widgets.
  • ErrorBoundaryState and ErrorFallbackBuilder typedefs for consumers that want to spell out the boundary's state shape or build their own fallbacks.

Documentation #

  • Bilingual README (English / Japanese) with usage examples covering the builder fallback, onError / onReset, resetKeys, and nested boundaries.
0
likes
160
points
73
downloads

Documentation

API reference

Publisher

verified publisherkyoheig3.jp

Weekly Downloads

Declarative error boundary widget for Flutter inspired by React's Error Boundary. Catch errors thrown by descendants and render fallback UI with reset support.

Repository (GitHub)
View/report issues

Topics

#error-boundary #error-handling #react #declarative

License

BSD-3-Clause (license)

Dependencies

async_zone, flutter

More

Packages that depend on async_error_boundary