RepaintDetector constructor

RepaintDetector({
  1. int paintFrequencyThreshold = 30,
  2. double paintTimePercentThreshold = 10,
  3. bool captureMode = false,
  4. DateTime clock()?,
})

Implementation

RepaintDetector({
  this.paintFrequencyThreshold = 30,
  this.paintTimePercentThreshold = 10,
  bool captureMode = false,
  DateTime Function()? clock,
}) : assert(
       paintTimePercentThreshold > 0 && paintTimePercentThreshold <= 100,
       'paintTimePercentThreshold must be above 0 and at most 100.',
     ),
     _captureMode = captureMode,
     _clock = clock ?? monotonicClock(),
     super(
       type: DetectorType.repaint,
       lifecycle: DetectorLifecycle.hybrid,
       name: 'Repaint',
       description:
           'Detects paint work above 10% of UI-thread time (VM) or '
           'widgets that start more than 30 repaints per second (debug)',
     ) {
  _windowStart = _clock();
}