configure static method

void configure(
  1. ErrorTrackingConfig config
)

Configure error tracking

Implementation

static void configure(ErrorTrackingConfig config) {
  _config = config;

  // Set up global error handlers if enabled
  if (config.enabled) {
    FlutterError.onError = (FlutterErrorDetails details) {
      captureException(
        details.exception,
        details.stack ?? StackTrace.current,
        severity: ErrorSeverity.error,
      );
    };

    PlatformDispatcher.instance.onError = (error, stack) {
      captureException(error, stack, severity: ErrorSeverity.fatal);
      return true;
    };
  }
}