CaptureHelper constructor

CaptureHelper({
  1. Capture captureFactory()?,
})

Creates a CaptureHelper.

The optional captureFactory allows injecting a fake Capture in tests. Production code should use the default no-arg constructor.

Implementation

CaptureHelper({Capture Function()? captureFactory})
    : _captureFactory = captureFactory ?? Capture.new;