ErrorBoundary class
Error boundary for safe state updates with error recovery
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Static Methods
-
getErrorContext(
Object error, StackTrace? stackTrace) → Map< String, dynamic> - Get error context for better debugging
-
getErrorMessage(
Object error, [StackTrace? stackTrace]) → String - Get user-friendly error message from an error object
-
safeUpdate<
T> (T update(), {T? fallback}) → T? - Execute a function safely, returning fallback on error
-
safeUpdateAsync<
T> (Future< T> update(), {T? fallback}) → Future<T?> - Execute an async function safely, returning fallback on error
-
safeUpdateAsyncOrThrow<
T> (Future< T> update()) → Future<T> - Execute an async function safely, throwing if error occurs
-
safeUpdateAsyncWithHandler<
T> (Future< T> update(), Future<T> onError(Object error, StackTrace stackTrace)) → Future<T> - Execute an async function with custom error handler
-
safeUpdateOrThrow<
T> (T update()) → T - Execute a function safely, throwing if error occurs
-
safeUpdateWithHandler<
T> (T update(), T onError(Object error, StackTrace stackTrace)) → T - Execute a function with custom error handler