SentryOptions constructor

SentryOptions({
  1. String? dsn,
  2. PlatformChecker? checker,
})

Implementation

SentryOptions({this.dsn, PlatformChecker? checker}) {
  if (checker != null) {
    platformChecker = checker;
  }

  // In debug mode we want to log everything by default to the console.
  // In order to do that, this must be the first thing the SDK does
  // and the first thing the SDK does, is to instantiate SentryOptions
  if (platformChecker.isDebugMode()) {
    debug = true;
  }

  sdk = SdkVersion(name: sdkName(platformChecker.isWeb), version: sdkVersion);
  sdk.addPackage('pub:sentry', sdkVersion);
}