Config constructor

const Config({
  1. required String accessToken,
  2. String endpoint = 'https://api.rollbar.com/api/1/item/',
  3. String environment = Environment.mode,
  4. String framework = 'dart',
  5. String codeVersion = 'main',
  6. String? package,
  7. String persistencePath = './',
  8. Duration persistenceLifetime = const Duration(days: 1),
  9. bool handleUncaughtErrors = true,
  10. bool includePlatformLogs = false,
  11. FutureOr<Sandbox> sandbox(
    1. Config
    ) = IsolatedSandbox.spawn,
  12. Notifier notifier(
    1. Config
    ) = CoreNotifier.new,
  13. Marshaller marshaller(
    1. Config
    ) = DataMarshaller.new,
  14. Transformer transformer(
    1. Config
    ) = NoopTransformer.new,
  15. Sender sender(
    1. Config
    ) = PersistentHttpSender.new,
  16. Client httpClient() = http.Client.new,
})

Implementation

const Config({
  required this.accessToken,
  this.endpoint = 'https://api.rollbar.com/api/1/item/',
  this.environment = Environment.mode,
  this.framework = 'dart',
  this.codeVersion = 'main',
  this.package,
  this.persistencePath = './',
  this.persistenceLifetime = const Duration(days: 1),
  this.handleUncaughtErrors = true,
  this.includePlatformLogs = false,
  this.sandbox = IsolatedSandbox.spawn,
  this.notifier = CoreNotifier.new,
  this.marshaller = DataMarshaller.new,
  this.transformer = NoopTransformer.new,
  this.sender = PersistentHttpSender.new,
  this.httpClient = http.Client.new,
});