LeakTrackerException constructor

LeakTrackerException({
  1. required List<Allocation> leaks,
  2. LeakFilter filter = const .ignoreNone(),
})

Creates a leak report exception.

The leaks list must not be empty, as this exception represents the presence of detected leaks. The optional filter describes the rule used to determine which allocations were considered leaks.

Implementation

LeakTrackerException({required this.leaks, this.filter = const .ignoreNone()})
  : assert(
      leaks.isNotEmpty,
      'LeakTrackerException must have at least one leak.',
    );