ErrorBoundary class final

An error-boundary configuration.

The JavaScript renderer uses a small class-based boundary internally while keeping the public Dart component model functional. SSR helpers retry with the first Dart fallback when a render-time error escapes React's server renderer.

See https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary.

Inheritance

Constructors

ErrorBoundary({required List<ReactNode> children, required ReactNode fallback, void onError(Object error, StackTrace stack)?})
Creates an error-boundary placeholder.
const

Properties

children List<ReactNode>
The content protected by the boundary.
final
fallback ReactNode
The content or builder shown after an error.
final
hashCode int
The hash code for this object.
no setterinherited
onError → void Function(Object error, StackTrace stack)?
Receives the error and a Dart stack at the report site.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited