withCreationStackTrace method

  1. @useResult
LeakTesting withCreationStackTrace()

Copies with enabled collection of creation stack trace.

Stack trace of the leaked object creation will be added to diagnostics.

Implementation

@useResult
LeakTesting withCreationStackTrace() {
  return copyWith(
    leakDiagnosticConfig: leakDiagnosticConfig.copyWith(
      collectStackTraceOnStart: true,
    ),
  );
}