ErrorBoundary class abstract

Component that catches errors in its subtree

Inheritance

Constructors

ErrorBoundary({String? key})

Properties

contentViewId String?
The native view ID of the rendered content
getter/setter pairinherited
effectiveNativeViewId String?
Get effective native view ID (may be from rendered content)
no setterinherited
error Object?
Get current error
no setter
hasError bool
Get whether there's an error
no setter
hashCode int
The hash code for this object.
no setterinherited
instanceId String
Unique ID for this component instance
finalinherited
isMounted bool
Get whether the component is mounted
no setterinherited
key String?
Unique identifier for this node
finalinherited
nativeViewId String?
Native view ID once rendered
getter/setter pairinherited
parent DCFComponentNode?
Parent node in the virtual tree
getter/setter pairinherited
renderedNode DCFComponentNode
Get the rendered node (lazily render if necessary)
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduleUpdate ↔ dynamic Function()
Function to schedule updates when state changes
getter/setter pairinherited
stackTrace StackTrace?
Get error stack trace
no setter
typeName String
Type name for debugging
finalinherited

Methods

clone() DCFComponentNode
Implement VDomNode methods
inherited
componentDidMount() → void
Called when the component is mounted
inherited
componentDidUpdate(Map<String, dynamic> prevProps) → void
Called after the component updates
inherited
componentWillUnmount() → void
Called when the component will unmount
inherited
equals(DCFComponentNode other) bool
Whether this node is equal to another
inherited
handleError(Object error, StackTrace stackTrace) → void
Handle error in child component
mount(DCFComponentNode? parent) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareForRender() → void
Reset hook state for next render
inherited
render() DCFComponentNode
Render the component - must be implemented by subclasses
override
renderContent() DCFComponentNode
Render content when no error
renderFallback(Object error, StackTrace? stackTrace) DCFComponentNode
Render fallback UI when error occurs
resetError() → void
Reset error state
runEffectsAfterRender() → void
Run effects after render - called by VDOM
inherited
toString() String
A string representation of this object.
inherited
unmount() → void
inherited
useEffect(dynamic Function()? effect(), {List dependencies = const []}) → void
Create an effect hook
inherited
useRef<T>([T? initialValue]) RefObject<T>
Create a ref hook
inherited
useState<T>(T initialValue, [String? name]) StateHook<T>
Create a state hook
inherited
useStore<T>(Store<T> store) StoreHook<T>
Create a store hook for global state
inherited

Operators

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