ErrorStack class

The main entry point for ErrorStack.

Provides a singleton facade that coordinates configuration, storage, and error handling components.

Basic Usage

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await ErrorStack.init();
  runApp(MyApp());
}

Advanced Usage

await ErrorStack.init(
  level: ErrorStackLogLevel.verbose,
  initialRoute: '/home',
  forceDebugWidget: true,
);

Properties

config ErrorStackConfig
The current configuration.
getter/setter pair
handler ErrorStackHandler
The error handler.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage ErrorStackStorageBase
The storage backend for preferences.
getter/setter pair

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 Properties

builder Widget Function(BuildContext, Widget?)
A builder function for MaterialApp that wraps the app with debug tools.
no setter
instance ErrorStack
The singleton instance of ErrorStack.
final
isInitialized bool
Returns true if ErrorStack has been initialized.
no setter

Static Methods

init({ErrorStackLogLevel level = ErrorStackLogLevel.verbose, String initialRoute = '/', Widget errorWidget(FlutterErrorDetails errorDetails)?, bool forceDebugWidget = false, ErrorStackStorageBase? storage, DevPanelConfig? devPanelConfig, bool? enableDevPanel}) Future<void>
Initialize the ErrorStack package.
showDevPanel(BuildContext context) → void
Shows the dev panel programmatically.