AutoSnapshottingConfig constructor

AutoSnapshottingConfig({
  1. int thresholdMb = 1024,
  2. int? increaseMb = 512,
  3. String directory = 'dart_memory_snapshots',
  4. int directorySizeLimitMb = 10240,
  5. Duration minDelayBetweenSnapshots = const Duration(seconds: 10),
  6. SnapshotCallback? onSnapshot,
})

Implementation

AutoSnapshottingConfig({
  this.thresholdMb = 1024, // 1Gb
  this.increaseMb = 512, // 0.5Gb
  this.directory = 'dart_memory_snapshots',
  this.directorySizeLimitMb = 10240, // 10Gb
  this.minDelayBetweenSnapshots = const Duration(seconds: 10),
  this.onSnapshot,
}) {
  if (minDelayBetweenSnapshots <= Duration.zero) {
    throw ArgumentError.value(
      minDelayBetweenSnapshots,
      'minDelayBetweenSnapshots',
      'must be positive',
    );
  }
}